]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/rgw: force s3 java tests to run gradle on Java 8 61054/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Mon, 9 Dec 2024 22:23:59 +0000 (17:23 -0500)
committerShilpa Jagannath <smanjara@redhat.com>
Wed, 11 Dec 2024 22:03:32 +0000 (14:03 -0800)
Previously gradle would run using the default Java version. This looks
for Java 8 using `alternatives` and sets JAVA_HOME to the
corresponding directory prior to launching gradle.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
(cherry picked from commit 1c2954648362c450c3e90fa6b72814de8eeeafa2)

qa/tasks/s3tests_java.py

index 6aa88c12e2f98de667e629577dff63d58637e472..fd1f6e3b5121c810bed280a5df0dc9eec2d53ca3 100644 (file)
@@ -284,6 +284,7 @@ class S3tests_java(Task):
             args = ['cd',
                     '{tdir}/s3-tests-java'.format(tdir=testdir),
                     run.Raw('&&'),
+                    run.Raw('JAVA_HOME=$(alternatives --list | grep jre_1.8.0 | head -n 1 | awk \'{print $3}\')'),
                     '/opt/gradle/gradle/bin/gradle', 'clean', 'test',
                     '--rerun-tasks', '--no-build-cache',
                     ]