Uncouple ART gtests from the ART APEX.
Introduce standalone versions of ART gtests on target, not bundled
with the ART APEX.
So far ART gtests have always been built as debug artifacts (and
linked against ART debug libraries). Make some adjustments in some of
these tests so that they can also work as non-debug artifacts and be
used with the Release ART APEX (which contains only non-debug
artifacts).
Newly added tests:
* `art_standalone_cmdline_tests`
* `art_standalone_compiler_tests`
* `art_standalone_dex2oat_tests`
* `art_standalone_dexdump_tests`
* `art_standalone_dexlist_tests`
* `art_standalone_dexoptanalyzer_tests`
* Note: Requires root access to the device.
* `art_standalone_libartbase_tests`
* `art_standalone_libartpalette_tests`
* `art_standalone_libartservice_tests`
* `art_standalone_libarttools_tests`
* `art_standalone_libdexfile_support_tests`
* `art_standalone_libdexfile_tests`
* `art_standalone_libprofile_tests`
* `art_standalone_oatdump_tests`
* `art_standalone_odrefresh_tests`
* `art_standalone_profman_tests`
* Note: Requires root access to the device.
* Note: Some tests (2 out of 37) are failing in multi-ABI
contexts and have been temporarily disabled.
* `art_standalone_runtime_compiler_tests`
* `art_standalone_runtime_tests`
* Note: Some tests (16 out of 686) are failing and have been
temporarily disabled.
* Note: Some tests (4 out of 686) are failing in multi-ABI
contexts and have been temporarily disabled.
* `art_standalone_sigchain_tests`
Tests not added:
* `art_standalone_dexanalyze_tests`
* Reason: ART binary `dexanalyze` is not part of the Release ART APEX.
* `art_standalone_dexdiag_tests`
* Reason: ART binary `dexdiag` is not part of the Release ART APEX.
* `art_standalone_dexlayout_tests`
* Reason: ART binary `dexlayout` is not part of the Release ART APEX.
* `art_standalone_imgdiag_tests`
* Reason: ART binary `imgdiag` is not part of the Release ART APEX.
Test: atest -a art_standalone_cmdline_tests
Test: atest -a art_standalone_compiler_tests
Test: atest -a art_standalone_dex2oat_tests
Test: atest -a art_standalone_dexdump_tests
Test: atest -a art_standalone_dexlist_tests
Test: atest -a art_standalone_dexoptanalyzer_tests
Test: atest -a art_standalone_libartbase_tests
Test: atest -a art_standalone_libartpalette_tests
Test: atest -a art_standalone_libartservice_tests
Test: atest -a art_standalone_libarttools_tests
Test: atest -a art_standalone_libdexfile_support_tests
Test: atest -a art_standalone_libdexfile_tests
Test: atest -a art_standalone_libprofile_tests
Test: atest -a art_standalone_oatdump_tests
Test: atest -a art_standalone_odrefresh_tests
Test: atest -a art_standalone_profman_tests
Test: atest -a art_standalone_runtime_compiler_tests
Test: atest -a art_standalone_runtime_tests
Test: atest -a art_standalone_sigchain_tests
Test: atest -a art_standalone_\*_tests
Test: m art_chroot && atest ArtGtestsTargetChroot
Bug: 162834439
Bug: 162734417
Change-Id: I8beda9159d48c4ca495698357dc3bd95e3ff84d5
diff --git a/libartservice/Android.bp b/libartservice/Android.bp
index 5f8a296..18c851e 100644
--- a/libartservice/Android.bp
+++ b/libartservice/Android.bp
@@ -99,11 +99,8 @@
dist_group: "android",
}
-art_cc_test {
- name: "art_libartservice_tests",
- defaults: [
- "art_gtest_defaults",
- ],
+art_cc_defaults {
+ name: "art_libartservice_tests_defaults",
srcs: [
"service/native/service_test.cc",
],
@@ -112,3 +109,23 @@
"libartservice",
],
}
+
+// Version of ART gtest `art_libartservice_tests` bundled with the ART APEX on target.
+// TODO(b/192274705): Remove this module when the migration to standalone ART gtests is complete.
+art_cc_test {
+ name: "art_libartservice_tests",
+ defaults: [
+ "art_gtest_defaults",
+ "art_libartservice_tests_defaults",
+ ],
+}
+
+// Standalone version of ART gtest `art_libartservice_tests`, not bundled with the ART APEX on
+// target.
+art_cc_test {
+ name: "art_standalone_libartservice_tests",
+ defaults: [
+ "art_standalone_gtest_defaults",
+ "art_libartservice_tests_defaults",
+ ],
+}