Skip to content

Commit 45f6b04

Browse files
committed
[OPENJDK-1966] Update to testlib to fix base image run on rhel 7. Also update version check for Oct CPU Java versions.
1 parent 98f535c commit 45f6b04

File tree

1 file changed

+13
-19
lines changed

1 file changed

+13
-19
lines changed

containersQa/testlib.bash

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ function pretest() {
7676
SKIPPED4="!skipped! jre only testing does not support this feature."
7777
SKIPPED5="!skipped! reproducers security now must be enabled by OTOOL_RUN_SECURITY_REPRODUCERS=true"
7878
SKIPPED6="!skipped! rhel 7 based images do not support this functionality."
79+
SKIPPED7="!skipped! rhel 7 Os version of Podman does not support this functionality."
7980
export DISPLAY=:0
8081
if [ "x$OTOOL_CONTAINER_RUNTIME" = "x" ] ; then
8182
export PD_PROVIDER=podman
@@ -107,6 +108,13 @@ function skipIfRhel7Execution() {
107108
fi
108109
}
109110

111+
function skipIfRhel7OsExecution() {
112+
if [ "$OTOOL_OS" == "el.7z" ] ; then
113+
echo "$SKIPPED7"
114+
exit
115+
fi
116+
}
117+
110118
## setUser: Check which OS version of container we are testing. Based on this, assign
111119
## the user for validation and further testing (s2i builds).
112120
function setUser() {
@@ -146,7 +154,7 @@ function pullImage() {
146154
}
147155

148156
function checkImage() {
149-
skipIfRhel7Execution
157+
skipIfRhel7OsExecution
150158
IMG_DIGEST=`$PD_PROVIDER inspect $HASH --format "{{.Digest}}"`
151159
SOURCE_OF_TRUTH=`basename $TEST_DIGEST |sed "s/.*@//"`
152160

@@ -537,20 +545,6 @@ function s2iLocal() {
537545
else
538546
cat $DF.orig | sed "s;/s2i/run;/s2i/run $ADDS;g;" > $DF.nw1
539547
fi
540-
# simplified, expectig rhel only:
541-
# if [ `getOsMajor` -eq 8 ] ; then
542-
## cat $DF.nw1 | sed "s|USER root|USER root\nRUN yum config-manager --add-repo 'http://download.eng.brq.redhat.com/composes/finished/latest-RHEL-8/compose/AppStream/\
543-
##$basearch/os/'\nRUN yum install -y nodejs|" > $DF
544-
# #echo
545-
# echo "rhel8 repos not added"
546-
# #unluckily, config-manager is notworking, removing nodejs from the project itself rather
547-
# elif [ `getOsMajor` -eq 7 ] ; then
548-
# # cat $DF.nw1 | sed "s|USER root|USER root\nRUN yum config-manager --add-repo 'http://download.fedoraproject.org/pub/epel/7/$\basearch'\\nRUN yum install -y nodejs|" > $DF
549-
# echo "rhel7 repos not added"
550-
# #unluckily, config-manager is notworking, removing nodejs from the project itself rather
551-
# else
552-
# echo "no rhel-specific changes"
553-
# fi
554548
cat $DF.nw1 | tee $DF
555549
buildFileWithHash $DF
556550
popd
@@ -702,17 +696,17 @@ function checkHardcodedJdks() {
702696
if [ "$OTOOL_jresdk" == "jre" ] ; then
703697
echo "otool jresdk settings is: $OTOOL_jresdk"
704698
echo "Check version based off java -version call."
705-
JRE_8_VERSION='1.8.0_382-b05'
706-
JRE_11_VERSION='11.0.20+8-LTS'
707-
JRE_17_VERSION='17.0.8+7-LTS'
699+
JRE_8_VERSION='1.8.0_392-b08'
700+
JRE_11_VERSION='11.0.21+9-LTS'
701+
JRE_17_VERSION='17.0.9+9-LTS'
708702
cat $(getOldJavaVersionLog)
709703
cat $(getOldJavaVersionLog) | grep "openjdk version"
710704
cat $(getOldJavaVersionLog) | grep -e "$JRE_11_VERSION" -e "$JRE_8_VERSION" -e "$JRE_17_VERSION"
711705

712706
else
713707
cat $(getOldMvnVersionLog)
714708
cat $(getOldMvnVersionLog) | grep "Java version:"
715-
cat $(getOldMvnVersionLog) | grep -e "Java version: 11.0.20" -e "Java version: 1.8.0_382" -e "Java version: 17.0.8"
709+
cat $(getOldMvnVersionLog) | grep -e "Java version: 11.0.21" -e "Java version: 1.8.0_392" -e "Java version: 17.0.9"
716710
fi
717711

718712
}

0 commit comments

Comments
 (0)