Commit 1c843e9c authored by Igor Murashkin's avatar Igor Murashkin
Browse files

test: enable javac/dx to import libcore on the bootclasspath

Fixes 12 tests with javac/dx.

Previously, javac with the default bootclasspath (unspecified) was used,
meaning that it would usually pickup rt.jar from a developer's JDK system
install.

With javac-helper.sh, libcore is used for the javac -bootclasspath,
enabling art tests to load libcore-specific packages such as libcore or
dalvik (in particular, it uses the output of art/tools/bootjars.sh which
calculates the correct bootclasspath from the build artifacts).

To get libcore on the bootclasspath, source files must be placed in a
'art/test/$TESTNAME/src-art' directory. Otherwise the old behavior is
kept to encourage tests to be cross-platform compatible.

The minimal set of tests that relied on 'import dalvik/import libcore'
had their src directories renamed to src-art, and are now building
successfully.

Test: ANDROID_COMPILE_WITH_JACK=false art/test.py
Bug: 36902714
Change-Id: Iafd245de9e04c312c5ac107897e34d7b97191726
parent 4db66ab6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment