rgw/test: enhanced java s3-tests change setting of JAVA_HOME

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 a49d4446e4)
This commit is contained in:
J. Eric Ivancich 2026-04-06 20:53:34 -04:00
parent f477f20183
commit d19578ffa7

View File

@ -284,7 +284,7 @@ class S3tests_java(Task):
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',
]