Summary:
Commit eb1d166b24a943aecb4be9b26fadddc32a7774d4 ("Fix parallel ctest
runs sharing the same TEST_TMPDIR") removed the
ensure_test_tmp_dir_is_set call yb_build.sh made before launching ctest.
That removal was correct for the C++/ctest path, but that global call
was also the only thing setting TEST_TMPDIR for the Java named-test path
(./yb_build.sh ... --java-test Foo).
As a result, when run_java_test calls rewrite_test_log, it fails with
"TEST_TMPDIR: unbound variable", even if the test otherwise passed.
Fix it at the leaf runner, mirroring run-test.sh: have run_java_test
call ensure_test_tmp_dir_is_set itself. This is idempotent for the
methods-separately path (which already sets it) and does not reintroduce
the pre-ctest global export that commit
eb1d166b24a943aecb4be9b26fadddc32a7774d4 removed.
Test Plan:
On Almalinux 8:
./yb_build.sh fastdebug --gcc15 daemons initdb \
--no-ybc --skip-pg-parquet --no-odyssey \
--java-test TestPgRegressInsertOnConflict
no longer gets the error message.
Backport-to: 2026.1
Reviewers: fizaa
Reviewed By: fizaa
Subscribers: fizaa, yql
Differential Revision: https://phorge.dev.yugabyte.com/D54995