Under Centos 9 the Java 8 version is recognized by the substring
"java-1.8" rather than "java-8". So the grep has been modified to
accept either.
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
(cherry picked from commit
a49d4446e4d84b28273b460b85a193011a9c4ed8)
args = ['cd',
'{tdir}/s3-tests-java'.format(tdir=testdir),
run.Raw('&&'),
- run.Raw('JAVA_HOME=$(ls -d /usr/lib/jvm/* | grep java-8 | head -n 1)'),
+ run.Raw('JAVA_HOME=$(ls -d /usr/lib/jvm/* | grep -E java-8\|java-1\.8 | head -n 1)'),
'/opt/gradle/gradle/bin/gradle', 'clean', 'test',
'--rerun-tasks', '--no-build-cache',
]