diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-02-10 15:44:00 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-02-10 15:44:00 -0800 |
commit | d24b8183b93e781080b2c16c487e60d51c12da31 (patch) | |
tree | fbb89154858984eb8e41556da7e9433040d55cd4 /tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java | |
parent | f1e484acb594a726fb57ad0ae4cfe902c7f35858 (diff) |
auto import from //branches/cupcake/...@130745
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 e0e535e356b1..1f37405c8e67 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); + } } |