summaryrefslogtreecommitdiffstats
path: root/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java')
-rwxr-xr-xtests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java
index e0e535e..1f37405 100755
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java
@@ -21,6 +21,9 @@ import com.android.dumprendertree.LayoutTestsAutoTest;
import android.test.InstrumentationTestRunner;
import android.test.InstrumentationTestSuite;
+import android.util.Log;
+import android.content.Intent;
+import android.os.Bundle;
/**
@@ -44,5 +47,22 @@ public class LayoutTestsAutoRunner extends InstrumentationTestRunner {
public ClassLoader getLoader() {
return LayoutTestsAutoRunner.class.getClassLoader();
}
+
+ @Override
+ public void onCreate(Bundle icicle) {
+ super.onCreate(icicle);
+ String path = (String) icicle.get("path");
+ LayoutTestsAutoTest.setLayoutTestDir(path);
+ String timeout_str = (String) icicle.get("timeout");
+ int timeout = 0; // default value
+ if (timeout_str != null) {
+ try {
+ timeout = Integer.parseInt(timeout_str);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ LayoutTestsAutoTest.setTimeoutInMillis(timeout);
+ }
}