Index: testing/android/native_test/java/src/org/chromium/native_test/NativeTestInstrumentationTestRunner.java |
diff --git a/testing/android/native_test/java/src/org/chromium/native_test/NativeTestInstrumentationTestRunner.java b/testing/android/native_test/java/src/org/chromium/native_test/NativeTestInstrumentationTestRunner.java |
index 52263ca72ef34bd879bef0678161d559c73dceba..a7443134cb3431c0cc22ea81a4087f2b6261ed6b 100644 |
--- a/testing/android/native_test/java/src/org/chromium/native_test/NativeTestInstrumentationTestRunner.java |
+++ b/testing/android/native_test/java/src/org/chromium/native_test/NativeTestInstrumentationTestRunner.java |
@@ -51,6 +51,8 @@ public class NativeTestInstrumentationTestRunner extends Instrumentation { |
"org.chromium.native_test.NativeTestInstrumentationTestRunner.ShardSizeLimit"; |
public static final String EXTRA_TEST_LIST_FILE = |
"org.chromium.native_test.NativeTestInstrumentationTestRunner.TestList"; |
+ public static final String EXTRA_TEST = |
+ "org.chromium.native_test.NativeTestInstrumentationTestRunner.Test"; |
private static final String TAG = "cr_NativeTest"; |
@@ -92,6 +94,13 @@ public class NativeTestInstrumentationTestRunner extends Instrumentation { |
if (shardSizeLimit != null) mShardSizeLimit = Integer.parseInt(shardSizeLimit); |
mTransparentArguments.remove(EXTRA_SHARD_SIZE_LIMIT); |
+ String singleTest = arguments.getString(EXTRA_TEST); |
+ if (singleTest != null) { |
+ ArrayList<String> shard = new ArrayList<>(1); |
+ shard.add(singleTest); |
+ mShards.add(shard); |
+ } |
+ |
String testListFilePath = arguments.getString(EXTRA_TEST_LIST_FILE); |
if (testListFilePath != null) { |
File testListFile = new File(testListFilePath); |