aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2020-07-17 03:06:16 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-07-17 03:06:16 +0000
commit379510bbf46e5604eb1a12e4f94e6fd6c0444476 (patch)
tree306bb44310d314c16f62fa88717bbc91464c6d32
parent574e7ae4c6f04ba9e22b3e109132fd3b09d2586b (diff)
parent8e336314b1f33f90c917fa4c06e120ee267ebbdb (diff)
downloadtradefederation-379510bbf46e5604eb1a12e4f94e6fd6c0444476.tar.gz
Merge "Fix sharding for executable test"
-rw-r--r--test_framework/com/android/tradefed/testtype/binary/ExecutableBaseTest.java3
-rw-r--r--tests/src/com/android/tradefed/testtype/binary/ExecutableTargetTestTest.java3
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);