1 #!/bin/bash
 2 #
 3 # Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
 4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 5 #
 6 # This code is free software; you can redistribute it and/or modify it
 7 # under the terms of the GNU General Public License version 2 only, as
 8 # published by the Free Software Foundation.  Oracle designates this
 9 # particular file as subject to the "Classpath" exception as provided
10 # by Oracle in the LICENSE file that accompanied this code.
11 #
12 # This code is distributed in the hope that it will be useful, but WITHOUT
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 # version 2 for more details (a copy is included in the LICENSE file that
16 # accompanied this code).
17 #
18 # You should have received a copy of the GNU General Public License version
19 # 2 along with this work; if not, write to the Free Software Foundation,
20 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 #
22 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23 # or visit www.oracle.com if you need additional information or have any
24 # questions.
25 #
26 
27 VECTORTESTS_HOME="$(pwd)"
28 JDK_SRC_HOME="./../../../../../"
29 JAVA="${JAVA_HOME}/bin/java"
30 JAVAC="${JAVA_HOME}/bin/javac"
31 BUILDLOG_FILE="./build.log"
32 SPP_CLASSNAME="build.tools.spp.Spp"
33 # Windows: Classpath Separator is ';'
34 # Linux: ':'
35 SEPARATOR=":"
36 TYPEPREFIX=""
37 TEMPLATE_FILE="unit_tests.template"
38 TEST_ITER_COUNT=100
39 
40 PERF_TEMPLATE_FILE="perf_tests.template"
41 PERF_SCALAR_TEMPLATE_FILE="perf_scalar_tests.template"
42 PERF_DEST="benchmark/src/main/java/benchmark/jdk/incubator/vector/"
43 
44 function Log () {
45   if [ $1 == true ]; then
46     echo "$2"
47   fi
48   echo "$2" >> $BUILDLOG_FILE
49 }
50 
51 function LogRun () {
52   if [ $1 == true ]; then
53     echo -ne "$2"
54   fi
55   echo -ne "$2" >> $BUILDLOG_FILE
56 }
57 
58 # Determine which delimiter to use based on the OS.
59 # Windows uses ";", while Unix-based OSes use ":"
60 uname_s=$(uname -s)
61 VECTORTESTS_HOME_CP=$VECTORTESTS_HOME
62 if [ "x${VAR_OS_ENV}" == "xwindows.cygwin" ]; then
63   VECTORTESTS_HOME_CP=$(cygpath -pw $VECTORTESTS_HOME)
64 fi
65 
66 if [ "$uname_s" == "Linux" ] || [ "$uname_s" == "Darwin" ]; then
67   SEPARATOR=":"
68 else
69   SEPARATOR=";"
70 fi