Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Unified Diff: testing/android/native_test/java/src/org/chromium/native_test/NativeTestInstrumentationTestRunner.java

Issue 1411153003: Android GTest Runner: Create flags & test list files only when required (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use null context manager Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698