diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 54898fd58..d42aa8fb6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,6 +22,7 @@ on: - "sbin/**" - "**.sh" - "!tooling/**" + - "!sbin/solaris/**" - ".github/workflows/build.yml" - "security/**" - "cyclonedx-lib/**" diff --git a/sbin/solaris/dotests.sh b/sbin/solaris/dotests.sh index 2329938bb..9d7a492d9 100755 --- a/sbin/solaris/dotests.sh +++ b/sbin/solaris/dotests.sh @@ -1,5 +1,5 @@ #!/bin/sh -# shellcheck disable=SC2155,SC2153,SC2038,SC1091,SC2116,SC2086 +# shellcheck disable=SC2155,SC2153,SC2038,SC1091,SC2116,SC2086,SC2006 # ******************************************************************************** # Copyright (c) 2017, 2024 Contributors to the Eclipse Foundation # @@ -12,7 +12,6 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************** -# shellcheck disable=SC2006 # # dotests.sh # Designed for running via a proxy machine for the Temurin Solaris tests @@ -24,15 +23,15 @@ # ./dotests.sh sanity openjdk # -if [ `uname -m` = i86pc ]; then ADOPTARCH=x64; else ADOPTARCH=sparcv9; fi # Check for Xvfb on display :5 -XVFB5=`ps -fu vagrant | grep 'Xvfb :5' | grep -v grep | wc -l` - echo XVFB5 = $XVFB5 +XVFB5=`ps -fu vagrant | awk '/Xvfb :5/ && !/awk/ {c=c+1} END {print c+0}'` +echo "XVFB5 = $XVFB5" + if [ $XVFB5 != 1 ]; then echo WARNING: Xvfb was not started - attempting to start ... nohup /usr/X11/bin/Xvfb :5 -screen 0 1024x768x24 & sleep 2 - XVFB5=`ps -fu vagrant | grep 'Xvfb :5' | grep -v grep | wc -l` + XVFB5=`ps -fu vagrant | awk '/Xvfb :5/ && !/awk/ {c=c+1} END {print c+0}'` echo XVFB5 = $XVFB5 [ $XVFB5 != 1 ] && echo Still failed to start Xvfb - manual intervention required && exit 1 fi @@ -50,7 +49,7 @@ else echo "ERROR: dotests.sh : UPSTREAM_JOBLINK not defined and build_artifacts/filenames.txt does not exist" - cannot progress exit 1 fi - JDK_TARBALL_NAME=`pwd`/build_artifacts/`cat build_artifacts/filenames.txt | grep "OpenJDK8U-jdk_.*tar.gz$"` + JDK_TARBALL_NAME=`pwd`/build_artifacts/`grep "OpenJDK8U-jdk_.*tar.gz$" ./build_artifacts/filenames.txt` else # Linter can go do one if it objects to the backticks - "$(" is not understood by Solaris' bourne shell (SC2006) JDK_TARBALL_NAME=`curl -s "${UPSTREAM_JOBLINK}/artifact/workspace/target/filenames.txt" | grep "OpenJDK8U-jdk_.*tar.gz$"` @@ -58,33 +57,40 @@ else echo Downloading and extracting JDK tarball ... curl -O "${UPSTREAM_JOBLINK}/artifact/workspace/target/$JDK_TARBALL_NAME" || exit 1 fi - cd aqa-tests + cd aqa-tests || exit 1 gzip -cd "$JDK_TARBALL_NAME" | tar xpf - echo Downloading and extracting JRE tarball ... Required for special.openjdk jdk_math_jre_0 target JRE_TARBALL_NAME="`echo $JDK_TARBALL_NAME | sed s/jdk/jre/`" - if [ "$1" = "special" -a "$2" = "openjdk" ]; then - if [ ! -z "${UPSTREAM_JOBLINK}" ]; then - curl -O "${UPSTREAM_JOBLINK}/artifact/workspace/target/$JRE_TARBALL_NAME" || exit 1 + if [ "$1" = "special" ]; then + if [ "$2" = "openjdk" ]; then + if [ "${UPSTREAM_JOBLINK}" != "" ]; then + curl -O "${UPSTREAM_JOBLINK}/artifact/workspace/target/$JRE_TARBALL_NAME" || exit 1 + fi + gzip -cd "$JRE_TARBALL_NAME" | tar xpf - fi - gzip -cd "$JRE_TARBALL_NAME" | tar xpf - fi fi PWD=`pwd` -TEST_JDK_HOME=`ls -1d $PWD/jdk8u* | grep -v jre` -JRE_IMAGE=`ls -1d $PWD/jdk8u* | grep jre` +TEST_JDK_HOME="" +JRE_IMAGE="" +for FILE in "$PWD"/jdk8u*; do + [ "`echo "$FILE" | grep -v jre`" ] && TEST_JDK_HOME="$FILE" + [ "`echo "$FILE" | grep jre`" ] && JRE_IMAGE="$FILE" +done env # TODO: Check if this actually exists -[ -z "$TEST_JDK_HOME" ] && echo Could not resolve TEST_JDK_HOME - aborting && exit 1 +[ -z "$TEST_JDK_HOME" ] && echo "Could not resolve TEST_JDK_HOME - aborting" && exit 1 echo TEST_JDK_HOME=$TEST_JDK_HOME "$TEST_JDK_HOME/bin/java" -version || exit 1 BUILD_LIST=$2 if [ "$BUILD_LIST" = "system" ]; then - mkdir -p `pwd`/systemtest_prereqs/mauve # systemtest_preqeqs not created til compile phase - curl -o `pwd`/systemtest_prereqs/mauve/mauve.jar \ + mkdir -p "`pwd`/systemtest_prereqs/mauve" # systemtest_preqeqs not created til compile phase + curl -o "`pwd`/systemtest_prereqs/mauve/mauve.jar" \ https://ci.adoptium.net/job/systemtest.getDependency/lastSuccessfulBuild/artifact/systemtest_prereqs/mauve/mauve.jar fi GET_SH_PARAMS="" if [ "$1" = "smoke" ]; then + # shellcheck disable=SC2121 set extended functional GET_SH_PARAMS="--vendor_repos https://github.com/adoptium/temurin-build --vendor_branches master --vendor_dirs /test/functional" BUILD_LIST=functional/buildAndPackage @@ -93,9 +99,9 @@ fi PATH=/usr/local/bin:/opt/csw/bin:`echo $PATH | sed 's,/usr/xpg4/bin,,g'` export TEST_JDK_HOME BUILD_LIST PATH JRE_IMAGE [ "$3" != "usecache" ] && ./get.sh ${GET_SH_PARAMS} -cd TKG +cd TKG || exit 1 (echo VENDOR OPTIONS = $VENDOR_TEST_REPOS / $VENDOR_TEST_DIRS / $VENDOR_TEST_BRANCHES) gmake compile -echo SXAEC: Running gmake _$1.$2 from `pwd` +echo SXAEC: Running gmake _$1.$2 from "`pwd`" DISPLAY=:5; export DISPLAY gmake _$1.$2 2>&1 | tee $1.$2.$$.log diff --git a/tooling/reproducible/repro_compare.sh b/tooling/reproducible/repro_compare.sh index fcf594c73..bbde69f03 100755 --- a/tooling/reproducible/repro_compare.sh +++ b/tooling/reproducible/repro_compare.sh @@ -83,6 +83,10 @@ echo "$(date +%T) : diff complete - rc=$rc. Output written to file: ${output}" cat "${output}" +# Restricting detailed output to classlist files only. +# This is because grepping every file overloads the test +# job with too much output, but the class list contents +# are especially useful when debugging a failure. grep "Files .*/classlist" "${output}" | while read -r line; do FILE1=$(echo "$line" | awk '{print $2}') FILE2=$(echo "$line" | awk '{print $4}')