Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mikir committed Dec 11, 2023
1 parent a511580 commit 930aedd
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,13 @@ test_java()
fi

# calculate number of all run tests from ant output log file
local JAVA_VERSION=`${JAVA_BIN} -version 2>&1 | grep version | cut -d'"' -f2 | cut -d'.' -f1`
local JAVA_MAJOR_VERSION=${JAVA_VERSION%.*}
if [[ "{JAVA_MAJOR_VERSION}" != "1."* ]] ; then
JAVA_MAJOR_VERSION=${JAVA_MAJOR_VERSION%.*}
fi
local JAVA_VERSION=`${ANT} -diagnostics | grep ant.java.version | cut -d' ' -f2`
local ANT_LOG_FILE="${TEST_OUT_DIR}/java/${JAVA_VERSION}/test_log.txt"
if [ ! -f "${ANT_LOG_FILE}" ] ; then
stderr_echo "Ant output file '${ANT_LOG_FILE}' does not exist!"
return 1
fi
local TEST_COUNTS=(`grep '.*tests found.*' "${ANT_LOG_FILE}" | tr -s ' ' | cut -d' ' -f4`)
local TOTAL_TEST_COUNT=0
local INDEX
for INDEX in ${!TEST_COUNTS[@]} ; do
TOTAL_TEST_COUNT=$((${TOTAL_TEST_COUNT} + ${TEST_COUNTS[INDEX]}))
Expand Down

0 comments on commit 930aedd

Please sign in to comment.