test: Cache repeated soong invocations of get_build_var
This speeds up testing considerably since every call into soong was
taking 10-40s and this had to be done for every run-test to query
the javac libcore bootclasspath.
Now it should only call into soong dumpvars once total.
Also speeds up 674-hiddenapi testrunner time by 2x.
Bug: 74196452
Test: time art/test/testrunner/testrunner.py --host --jit --64 -t 674-hiddenapi
Test: art/test/testrunner/testrunner.py --host
Test: # manual check soong isnt taking all the CPU while running above.
Test: art/test/run-test --host 004-JniTest # or any test really.
Test: art/test/testrunner/run_build_test_target.py art-test
Change-Id: I32f9247db76cfd61993b8f6ea1f0fffa1322a2c5
diff --git a/tools/bootjars.sh b/tools/bootjars.sh
index f710de9..dca209d 100755
--- a/tools/bootjars.sh
+++ b/tools/bootjars.sh
@@ -21,7 +21,7 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
TOP="$DIR/../.."
-source "${TOP}/build/envsetup.sh" >&/dev/null # import get_build_var
+source "${TOP}/art/tools/build/var_cache.sh" >&/dev/null # import get_build_var
selected_env_var=
core_jars_only=n