diff options
5 files changed, 74 insertions, 19 deletions
diff --git a/TEST_MAPPING b/TEST_MAPPING index d9d5431e3e..28216d5a1c 100644 --- a/TEST_MAPPING +++ b/TEST_MAPPING @@ -1398,7 +1398,12 @@ "name": "art_standalone_profman_tests[com.google.android.art.apex]" }, { - "name": "art_standalone_runtime_tests[com.google.android.art.apex]" + "name": "art_standalone_runtime_tests[com.google.android.art.apex]", + "options": [ + { + "exclude-filter": "OatFileAssistantUtilsTest#DexLocationToOdexFilename" + } + ] }, { "name": "art_standalone_sigchain_tests[com.google.android.art.apex]" @@ -1424,7 +1429,12 @@ "name": "art-apex-update-rollback" }, { - "name": "art_standalone_dexpreopt_tests" + "name": "art_standalone_dexpreopt_tests", + "options": [ + { + "exclude-filter": "DexpreoptTest#ForSystemServer" + } + ] }, { "name": "art-run-test-001-HelloWorld" @@ -2813,7 +2823,12 @@ "name": "art_standalone_profman_tests" }, { - "name": "art_standalone_runtime_tests" + "name": "art_standalone_runtime_tests", + "options": [ + { + "exclude-filter": "OatFileAssistantUtilsTest#DexLocationToOdexFilename" + } + ] }, { "name": "art_standalone_sigchain_tests" @@ -2833,7 +2848,12 @@ "name": "art-apex-update-rollback" }, { - "name": "art_standalone_dexpreopt_tests" + "name": "art_standalone_dexpreopt_tests", + "options": [ + { + "exclude-filter": "DexpreoptTest#ForSystemServer" + } + ] }, { "name": "art-run-test-001-HelloWorld" @@ -4222,7 +4242,12 @@ "name": "art_standalone_profman_tests" }, { - "name": "art_standalone_runtime_tests" + "name": "art_standalone_runtime_tests", + "options": [ + { + "exclude-filter": "OatFileAssistantUtilsTest#DexLocationToOdexFilename" + } + ] }, { "name": "art_standalone_sigchain_tests" diff --git a/test/odsign/test-src/com/android/tests/odsign/CompOsDenialHostTest.java b/test/odsign/test-src/com/android/tests/odsign/CompOsDenialHostTest.java index 83e4a39cf4..680a9761a0 100644 --- a/test/odsign/test-src/com/android/tests/odsign/CompOsDenialHostTest.java +++ b/test/odsign/test-src/com/android/tests/odsign/CompOsDenialHostTest.java @@ -56,6 +56,7 @@ public class CompOsDenialHostTest extends BaseHostJUnit4Test { OdsignTestUtils testUtils = new OdsignTestUtils(testInfo); CompOsTestUtils compOsTestUtils = new CompOsTestUtils(device); + compOsTestUtils.assumeNotOnCuttlefish(); compOsTestUtils.assumeCompOsPresent(); testUtils.installTestApex(); diff --git a/test/odsign/test-src/com/android/tests/odsign/CompOsSigningHostTest.java b/test/odsign/test-src/com/android/tests/odsign/CompOsSigningHostTest.java index 134cff9f8f..5660ce9b8f 100644 --- a/test/odsign/test-src/com/android/tests/odsign/CompOsSigningHostTest.java +++ b/test/odsign/test-src/com/android/tests/odsign/CompOsSigningHostTest.java @@ -54,6 +54,7 @@ public class CompOsSigningHostTest extends ActivationTest { OdsignTestUtils testUtils = new OdsignTestUtils(testInfo); CompOsTestUtils compOsTestUtils = new CompOsTestUtils(device); + compOsTestUtils.assumeNotOnCuttlefish(); compOsTestUtils.assumeCompOsPresent(); testInfo.properties().put(ORIGINAL_CHECKSUMS_KEY, diff --git a/test/odsign/test-src/com/android/tests/odsign/CompOsTestUtils.java b/test/odsign/test-src/com/android/tests/odsign/CompOsTestUtils.java index 60d7642d16..71b68c090a 100644 --- a/test/odsign/test-src/com/android/tests/odsign/CompOsTestUtils.java +++ b/test/odsign/test-src/com/android/tests/odsign/CompOsTestUtils.java @@ -125,6 +125,11 @@ public class CompOsTestUtils { assumeTrue(mDevice.doesFileExist("/apex/com.android.compos/")); } + public void assumeNotOnCuttlefish() throws Exception { + String product = mDevice.getProperty("ro.build.product"); + assumeTrue(product != null && !product.startsWith("vsoc_")); + } + private String assertCommandSucceeds(String command) throws DeviceNotAvailableException { CommandResult result = mDevice.executeShellV2Command(command); assertWithMessage(result.toString()).that(result.getExitCode()).isEqualTo(0); diff --git a/test/utils/regen-test-files b/test/utils/regen-test-files index d047c2354a..a926ba84f4 100755 --- a/test/utils/regen-test-files +++ b/test/utils/regen-test-files @@ -296,6 +296,13 @@ flaky_tests_excluded_from_mts = { ] } +# Tests failing because of code-vs-test mismatches (see b/316207823), +# excluded from all test mapping test groups. +failing_tests_excluded_from_test_mapping = { + "art_standalone_dexpreopt_tests" : ["DexpreoptTest#ForSystemServer"], + "art_standalone_runtime_tests" : ["OatFileAssistantUtilsTest#DexLocationToOdexFilename"], +} + # Tests failing because of linking issues, currently exluded from MTS # and Mainline Presubmits to minimize noise in continuous runs while # we investigate. @@ -307,6 +314,11 @@ failing_tests_excluded_from_mts_and_mainline_presubmits = { "art_standalone_libartpalette_tests": ["PaletteClientJniTest*"], } +failing_tests_excluded_from_mainline_presubmits = ( + failing_tests_excluded_from_test_mapping | + failing_tests_excluded_from_mts_and_mainline_presubmits +) + # Is `run_test` a Checker test (i.e. a test containing Checker # assertions)? def is_checker_test(run_test): @@ -585,25 +597,34 @@ class Generator: run_test_module_names = [ART_RUN_TEST_MODULE_NAME_PREFIX + t for t in art_run_tests] + def gen_tests_dict(tests, excluded_test_cases = {}, excluded_test_modules = [], suffix = ""): + return [ + ({"name": t + suffix, + "options": [ + {"exclude-filter": e} + for e in excluded_test_cases[t] + ]} + if t in excluded_test_cases + else {"name": t + suffix}) + for t in tests + if t not in excluded_test_modules + ] + # Mainline presubmits. mainline_presubmit_apex_suffix = "[com.google.android.art.apex]" mainline_other_presubmit_tests = [] mainline_presubmit_tests = (mainline_other_presubmit_tests + run_test_module_names + art_gtests_mainline_presubmit_module_names) - mainline_presubmit_tests_dict = [ - ({"name": t + mainline_presubmit_apex_suffix, - "options": [ - {"exclude-filter": e} - for e in failing_tests_excluded_from_mts_and_mainline_presubmits[t] - ]} - if t in failing_tests_excluded_from_mts_and_mainline_presubmits - else {"name": t + mainline_presubmit_apex_suffix}) - for t in mainline_presubmit_tests - ] + mainline_presubmit_tests_dict = \ + gen_tests_dict(mainline_presubmit_tests, + failing_tests_excluded_from_mainline_presubmits, + [], + mainline_presubmit_apex_suffix) # Android Virtualization Framework presubmits avf_presubmit_tests = ["ComposHostTestCases"] - avf_presubmit_tests_dict = [{"name": t} for t in avf_presubmit_tests] + avf_presubmit_tests_dict = gen_tests_dict(avf_presubmit_tests, + failing_tests_excluded_from_test_mapping) # Presubmits. other_presubmit_tests = [ @@ -614,9 +635,11 @@ class Generator: "art_standalone_dexpreopt_tests", ] presubmit_tests = other_presubmit_tests + run_test_module_names + art_gtest_module_names - presubmit_tests_dict = [{"name": t} for t in presubmit_tests] - hwasan_presubmit_tests_dict = [{"name": t} for t in presubmit_tests - if t not in known_failing_on_hwasan_tests] + presubmit_tests_dict = gen_tests_dict(presubmit_tests, + failing_tests_excluded_from_test_mapping) + hwasan_presubmit_tests_dict = gen_tests_dict(presubmit_tests, + failing_tests_excluded_from_test_mapping, + known_failing_on_hwasan_tests) # Use an `OrderedDict` container to preserve the order in which items are inserted. # Do not produce an entry for a test group if it is empty. |