diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2020-07-17 04:19:41 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-07-17 04:19:41 +0000 |
commit | 2e88a7ed88fd97ad82e0386d7819ede4937e91ad (patch) | |
tree | 215a2a0f5e85aee769069cd3a63896a9ef2ad471 | |
parent | b15a34c7db5ee22ad8fca39b76c2791915808935 (diff) | |
parent | bb19fb97dd0d0e8e09819f2afbf71ff042e3b9dc (diff) | |
download | tradefederation-2e88a7ed88fd97ad82e0386d7819ede4937e91ad.tar.gz |
Merge "Fix sharding for executable test" am: 379510bbf4 am: 0b3bad15cb am: e2ef9bad24 am: 3a7d981c9d am: bb19fb97dd
Original change: https://android-review.googlesource.com/c/platform/tools/tradefederation/+/1364911
Change-Id: I985771e2d62bda160382f93d0e5cc8696a4917f2
-rw-r--r-- | test_framework/com/android/tradefed/testtype/binary/ExecutableBaseTest.java | 3 | ||||
-rw-r--r-- | tests/src/com/android/tradefed/testtype/binary/ExecutableTargetTestTest.java | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/test_framework/com/android/tradefed/testtype/binary/ExecutableBaseTest.java b/test_framework/com/android/tradefed/testtype/binary/ExecutableBaseTest.java index 94e4aa619..eda9d308b 100644 --- a/test_framework/com/android/tradefed/testtype/binary/ExecutableBaseTest.java +++ b/test_framework/com/android/tradefed/testtype/binary/ExecutableBaseTest.java @@ -303,6 +303,9 @@ public abstract class ExecutableBaseTest // Set one test command per shard shard.mTestCommands.put(testName, cmd); } + // Copy the filters to each shard + shard.mExcludeFilters.addAll(mExcludeFilters); + shard.mIncludeFilters.addAll(mIncludeFilters); } catch (InstantiationException | IllegalAccessException | InvocationTargetException diff --git a/tests/src/com/android/tradefed/testtype/binary/ExecutableTargetTestTest.java b/tests/src/com/android/tradefed/testtype/binary/ExecutableTargetTestTest.java index ba18dc054..5c628dfde 100644 --- a/tests/src/com/android/tradefed/testtype/binary/ExecutableTargetTestTest.java +++ b/tests/src/com/android/tradefed/testtype/binary/ExecutableTargetTestTest.java @@ -52,7 +52,6 @@ public class ExecutableTargetTestTest { private final String testCmd2 = "cmd2"; private final String testName3 = "testName3"; private final String testCmd3 = "cmd3"; - private static final String NO_BINARY_ERROR = "Binary %s does not exist."; private static final String ERROR_MESSAGE = "binary returned non-zero exit code."; private ITestInvocationListener mListener = null; @@ -376,7 +375,7 @@ public class ExecutableTargetTestTest { /** Test split() for sharding */ @Test - public void testShard_Split() throws DeviceNotAvailableException, ConfigurationException { + public void testShard_Split() throws ConfigurationException { mExecutableTargetTest = new ExecutableTargetTest(); // Set test commands OptionSetter setter = new OptionSetter(mExecutableTargetTest); |