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