diff options
author | Victor Chang <vichang@google.com> | 2024-05-14 11:20:53 +0100 |
---|---|---|
committer | Victor Chang <vichang@google.com> | 2024-05-14 10:27:04 +0000 |
commit | 11bfb9cb8ee91bfdde1120e578f29bf5bf81e3a4 (patch) | |
tree | 4a832ded538de8f28b2619f9eea2633ac0567020 | |
parent | 0be570f563f452850f5812c6bfb360cae4a6e0ab (diff) | |
download | cts-11bfb9cb8ee91bfdde1120e578f29bf5bf81e3a4.tar.gz |
Run libcore tests in mts mode by default
It's needed because test/mts/tools/mts-tradefed/res/config/mts.xml
will not be used in the future when MCTS is fully ready. The mts.xml
tells the CoreTestModeFilter that CtsLibcoreTestCases
and CtsLibcoreOjTestCases should run in the mts mode.
Also, the default mode change here ensures that the same set of
test cases run in various CI as in the MCTS test runs.
Bug: 340212375
Bug: 287042293
Test: atest CtsLibcoreTestCases CtsLibcoreOjTestCases
Change-Id: I40e86af07aa3381f84b81ab86bdf7322e24c8d86
-rw-r--r-- | tests/core/runner-axt/src/com/android/cts/core/runner/filter/CoreTestModeFilter.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/core/runner-axt/src/com/android/cts/core/runner/filter/CoreTestModeFilter.java b/tests/core/runner-axt/src/com/android/cts/core/runner/filter/CoreTestModeFilter.java index b297b939f88..e827a500384 100644 --- a/tests/core/runner-axt/src/com/android/cts/core/runner/filter/CoreTestModeFilter.java +++ b/tests/core/runner-axt/src/com/android/cts/core/runner/filter/CoreTestModeFilter.java @@ -53,19 +53,19 @@ public class CoreTestModeFilter implements Predicate<Description> { */ public static Predicate<Description> createInstance(Bundle args) { String mode = args.getString(ARGUMENT_MODE); - if ("mts".equals(mode)) { - // We have to hard-coded the annotation name of NonMts because the annotation definition - // isn't built into the same apk file. - return new CoreTestModeFilter(NonMts.class); - } else if ("presubmit".equals(mode)) { - return new CoreTestModeFilter(FlakyTest.class, LargeTest.class); - } else { - // The default mode is CTS, because most libcore test suites are prefixed with "Cts". + if ("cts".equals(mode)) { // It's okay that ignoredTestsInCts.txt doesn't exist in the test .apk file, and // the created CoreExpectationFilter doesn't skip any test in this case. Set<String> expectationFile = Set.of("/skippedCtsTest.txt"); return new CoreTestModeFilter(NonCts.class) .and(CoreExpectationFilter.createInstance(expectationFile)); + } else if ("presubmit".equals(mode)) { + return new CoreTestModeFilter(FlakyTest.class, LargeTest.class); + } else { + // Use MTS mode by default because MCTS should dynamically download + // the MCTS artifacts in the same version as the ART module installed + // on the device. + return new CoreTestModeFilter(NonMts.class); } } |