Skip to content

Commit eb910a6

Browse files
committed
Skipping the HUM test if moutns do not work
1 parent 9ed7dc5 commit eb910a6

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

containersQa/109_HUM151_jreCompileAsRoot.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ readonly SCRIPT_DIR="$( cd -P "$( dirname "$SCRIPT_SOURCE" )" && pwd )"
1616
source $SCRIPT_DIR/testlib.bash
1717

1818
if ! which sudo; then
19-
echo '!skipped! No sudo on system'
19+
echo "$SKIPPED9"
2020
exit
2121
fi
2222

containersQa/testlib.bash

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ function pretest() {
8484
SKIPPED6="!skipped! rhel 7 based images do not support this functionality."
8585
SKIPPED7="!skipped! rhel 7 Os version of Podman does not support this functionality."
8686
SKIPPED8="!skipped! Skipping FIPS algorithms/providers tests."
87+
SKIPPED9='!skipped! No sudo on system'
88+
SKIPPED10='!skipped! mount do not work'
89+
SKIPPED11='!skipped! Skipping runtime compilation on 8 and 11'
8790
export DISPLAY=:0
8891
if [ "x$OTOOL_CONTAINER_RUNTIME" = "x" ] ; then
8992
export PD_PROVIDER=podman
@@ -1165,13 +1168,17 @@ function assertCryptoProviders() {
11651168

11661169

11671170
function tryJreCompilation() {
1168-
# if mount do not work, skip?
1169-
runOnBaseDirBashWithMount "ls -l /" "$1"
1170-
runOnBaseDirBashWithMount "ls -ld /testsDir" "$1"
1171-
runOnBaseDirBashWithMount "ls -l /testsDir | grep \\.java$" "$1"
1171+
local mountFailures=0
1172+
runOnBaseDirBashWithMount "ls -l /" "$1" || let mountFailures="$mountFailures+1"
1173+
runOnBaseDirBashWithMount "ls -ld /testsDir" "$1" || let mountFailures="$mountFailures+10"
1174+
runOnBaseDirBashWithMount "ls -l /testsDir | grep \\.java$" "$1" || let mountFailures="$mountFailures+100"
1175+
if [ "0$mountFailures" -gt 0 ] ; then
1176+
echo "$SKIPPED10"
1177+
exit 0
1178+
fi
11721179
local v=$(runOnBaseDirBashWithMount "java -version " 2>&1 | grep "openjdk version" | head -n 1)
11731180
if echo "$v" | grep '"1.8' || echo "$v" | grep '"11' ; then
1174-
echo '!skipped! Skipping runtime compilation on 8 and 11'
1181+
echo "$SKIPPED11"
11751182
exit 0
11761183
else
11771184
echo '17+, going on'

0 commit comments

Comments
 (0)