testrunner: Forward --build-with-javac-dx to run-test
When setting ANDROID_COMPILE_WITH_JACK=false,
make testrunner.py invoke run-test build scripts with javac+dx.
This allows most of the tests to build (and pass) with javac/dx
instead of jack. All failing tests are blacklisted.
Known issues:
* Any tests using InvokeDynamic will fail (need desugar support).
* Any tests with USE_JACK=true will fail (don't have bin/jack).
Bug: 37636792
Bug: 36902714
Change-Id: Ib427197add5a1dd9b134a83c25d989fd518b2a64
diff --git a/test/knownfailures.json b/test/knownfailures.json
index 0e42a29..3ca67bf 100644
--- a/test/knownfailures.json
+++ b/test/knownfailures.json
@@ -602,5 +602,67 @@
],
"bug": "b/37239009",
"variant": "jvmti-stress"
+ },
+ {
+ "tests": [
+ "004-JniTest",
+ "004-NativeAllocations",
+ "004-ReferenceMap",
+ "004-StackWalk",
+ "048-reflect-v8",
+ "089-many-methods",
+ "138-duplicate-classes-check",
+ "146-bad-interface",
+ "157-void-class",
+ "563-checker-invoke-super",
+ "580-checker-string-fact-intrinsics",
+ "596-monitor-inflation",
+ "604-hot-static-interface",
+ "612-jit-dex-cache",
+ "613-inlining-dex-cache",
+ "616-cha-interface-default",
+ "636-wrong-static-access",
+ "909-attach-agent",
+ "910-methods",
+ "911-get-stack-trace",
+ "912-classes",
+ "913-heaps",
+ "914-hello-obsolescence",
+ "915-obsolete-2",
+ "916-obsolete-jit",
+ "919-obsolete-fields",
+ "921-hello-failure",
+ "926-multi-obsolescence",
+ "940-recursive-obsolete",
+ "941-recurive-obsolete-jit",
+ "942-private-recursive",
+ "943-private-recursive-jit",
+ "945-obsolete-native",
+ "946-obsolete-throw",
+ "948-change-annotations",
+ "950-redefine-intrinsic",
+ "951-threaded-obsolete",
+ "952-invoke-custom",
+ "953-invoke-polymorphic-compiler",
+ "956-methodhandles",
+ "957-methodhandle-transforms",
+ "958-methodhandle-stackframe",
+ "959-invoke-polymorphic-accessors",
+ "960-default-smali",
+ "961-default-iface-resolution-gen",
+ "962-iface-static",
+ "963-default-range-smali",
+ "964-default-iface-init-gen",
+ "965-default-verify",
+ "966-default-conflict",
+ "967-default-ame",
+ "969-iface-super",
+ "981-dedup-original-dex",
+ "984-obsolete-invoke",
+ "985-re-obsolete"
+ ],
+ "description": "Tests that use javac/dx to build (not jack).",
+ "env_vars": {"ANDROID_COMPILE_WITH_JACK": "false"},
+ "bug": "b/37636792"
}
]
diff --git a/test/testrunner/env.py b/test/testrunner/env.py
index 7d9297f..a0c4ea8 100644
--- a/test/testrunner/env.py
+++ b/test/testrunner/env.py
@@ -95,6 +95,9 @@
ANDROID_BUILD_TOP = _get_android_build_top()
+# Compiling with jack? Possible values in (True, False, 'default')
+ANDROID_COMPILE_WITH_JACK = _getEnvBoolean('ANDROID_COMPILE_WITH_JACK', 'default')
+
# Directory used for temporary test files on the host.
ART_HOST_TEST_DIR = tempfile.mkdtemp(prefix = 'test-art-')
diff --git a/test/testrunner/testrunner.py b/test/testrunner/testrunner.py
index 8072631..a809246 100755
--- a/test/testrunner/testrunner.py
+++ b/test/testrunner/testrunner.py
@@ -450,6 +450,12 @@
options_test += ' --instruction-set-features ' + \
env.HOST_2ND_ARCH_PREFIX_DEX2OAT_HOST_INSTRUCTION_SET_FEATURES
+ # Use the default run-test behavior unless ANDROID_COMPILE_WITH_JACK is explicitly set.
+ if env.ANDROID_COMPILE_WITH_JACK == True:
+ options_test += ' --build-with-jack'
+ elif env.ANDROID_COMPILE_WITH_JACK == False:
+ options_test += ' --build-with-javac-dx'
+
# TODO(http://36039166): This is a temporary solution to
# fix build breakages.
options_test = (' --output-path %s') % (