| 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 6e39401882a20d741df6361ac6951cfb31643c51..52263ca72ef34bd879bef0678161d559c73dceba 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
|
| @@ -52,7 +52,7 @@ public class NativeTestInstrumentationTestRunner extends Instrumentation {
|
| public static final String EXTRA_TEST_LIST_FILE =
|
| "org.chromium.native_test.NativeTestInstrumentationTestRunner.TestList";
|
|
|
| - private static final String TAG = "cr.native_test";
|
| + private static final String TAG = "cr_NativeTest";
|
|
|
| private static final long DEFAULT_SHARD_NANO_TIMEOUT = 60 * 1000000000L;
|
| // Default to no size limit.
|
| @@ -63,11 +63,10 @@ public class NativeTestInstrumentationTestRunner extends Instrumentation {
|
| Pattern.compile("\\[ *([^ ]*) *\\] ?([^ ]+)( .*)?$");
|
|
|
| private ResultsBundleGenerator mBundleGenerator = new RobotiumBundleGenerator();
|
| - private String mCommandLineFile;
|
| - private String mCommandLineFlags;
|
| private Handler mHandler = new Handler();
|
| - private String mNativeTestActivity;
|
| private Bundle mLogBundle = new Bundle();
|
| + private SparseArray<ShardMonitor> mMonitors = new SparseArray<ShardMonitor>();
|
| + private String mNativeTestActivity;
|
| private TestStatusReceiver mReceiver;
|
| private Map<String, ResultsBundleGenerator.TestResult> mResults =
|
| new HashMap<String, ResultsBundleGenerator.TestResult>();
|
| @@ -75,20 +74,23 @@ public class NativeTestInstrumentationTestRunner extends Instrumentation {
|
| private long mShardNanoTimeout = DEFAULT_SHARD_NANO_TIMEOUT;
|
| private int mShardSizeLimit = DEFAULT_SHARD_SIZE_LIMIT;
|
| private File mStdoutFile;
|
| - private SparseArray<ShardMonitor> mMonitors = new SparseArray<ShardMonitor>();
|
| + private Bundle mTransparentArguments;
|
|
|
| @Override
|
| public void onCreate(Bundle arguments) {
|
| - mCommandLineFile = arguments.getString(NativeTestActivity.EXTRA_COMMAND_LINE_FILE);
|
| - mCommandLineFlags = arguments.getString(NativeTestActivity.EXTRA_COMMAND_LINE_FLAGS);
|
| + mTransparentArguments = new Bundle(arguments);
|
| +
|
| mNativeTestActivity = arguments.getString(EXTRA_NATIVE_TEST_ACTIVITY);
|
| if (mNativeTestActivity == null) mNativeTestActivity = DEFAULT_NATIVE_TEST_ACTIVITY;
|
| + mTransparentArguments.remove(EXTRA_NATIVE_TEST_ACTIVITY);
|
|
|
| String shardNanoTimeout = arguments.getString(EXTRA_SHARD_NANO_TIMEOUT);
|
| if (shardNanoTimeout != null) mShardNanoTimeout = Long.parseLong(shardNanoTimeout);
|
| + mTransparentArguments.remove(EXTRA_SHARD_NANO_TIMEOUT);
|
|
|
| String shardSizeLimit = arguments.getString(EXTRA_SHARD_SIZE_LIMIT);
|
| if (shardSizeLimit != null) mShardSizeLimit = Integer.parseInt(shardSizeLimit);
|
| + mTransparentArguments.remove(EXTRA_SHARD_SIZE_LIMIT);
|
|
|
| String testListFilePath = arguments.getString(EXTRA_TEST_LIST_FILE);
|
| if (testListFilePath != null) {
|
| @@ -116,6 +118,7 @@ public class NativeTestInstrumentationTestRunner extends Instrumentation {
|
| Log.e(TAG, "Error reading %s", testListFile.getAbsolutePath(), e);
|
| }
|
| }
|
| + mTransparentArguments.remove(EXTRA_TEST_LIST_FILE);
|
|
|
| try {
|
| mStdoutFile = File.createTempFile(
|
| @@ -220,14 +223,7 @@ public class NativeTestInstrumentationTestRunner extends Instrumentation {
|
| Intent i = new Intent(Intent.ACTION_MAIN);
|
| i.setComponent(new ComponentName(getContext().getPackageName(), mNativeTestActivity));
|
| i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
| - if (mCommandLineFile != null) {
|
| - Log.i(TAG, "Passing command line file extra: %s", mCommandLineFile);
|
| - i.putExtra(NativeTestActivity.EXTRA_COMMAND_LINE_FILE, mCommandLineFile);
|
| - }
|
| - if (mCommandLineFlags != null) {
|
| - Log.i(TAG, "Passing command line flag extra: %s", mCommandLineFlags);
|
| - i.putExtra(NativeTestActivity.EXTRA_COMMAND_LINE_FLAGS, mCommandLineFlags);
|
| - }
|
| + i.putExtras(mTransparentArguments);
|
| if (mShards != null && !mShards.isEmpty()) {
|
| ArrayList<String> shard = mShards.remove();
|
| i.putStringArrayListExtra(NativeTestActivity.EXTRA_SHARD, shard);
|
|
|