diff options
Diffstat (limited to 'tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java')
-rwxr-xr-x | tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java | 20 |
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); + } } |