ART: Fix test JAR dependencies for SOONG_ONLY builds
The buildbot-build.sh script was failing in SOONG_ONLY=true mode because
it relied on Make-based copy rules to place test JARs (from
libcore_tests_classpath and libjdwp_tests_classpath) into their expected
out/target/common/obj/JAVA_LIBRARIES/ directories. These rules are not
executed in a SOONG_ONLY build, resulting in missing classes.jar files.
This change fixes the build by making art_build.py explicitly handle
these dependencies.
Key changes:
1. Added `art-libcore-jdwp-test-jars` target to `art_build.py`: This
new internal target builds the required Java test modules
(core-tests, core-ojtests, etc.) and then copies the resulting JARs
from out/soong/.intermediates/ to the legacy classes.jar path.
2. Made it a dependency for `build-art-target-run-tests`: This ensures
the test JARs are in place before tests are run.
3. Cleaned up `buildbot-build.sh`: Removed the now-redundant logic that
attempted to add these JAR paths to the build targets.
With this fix, the necessary test dependencies are correctly handled
within the Soong build process, allowing buildbot-build.sh to function
correctly in a SOONG_ONLY=true environment.
Flag: EXEMPT BUGFIX
Bug: 457991026
Test: SOONG_ONLY=true ./art/tools/buildbot-build.sh
Change-Id: Iaf7ca653f6d16c32f7fe9bd39893a042d9607c34
2 files changed