summaryrefslogtreecommitdiff
path: root/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java
diff options
context:
space:
mode:
authorGuang Zhu <guangzhu@google.com>2009-05-18 14:37:23 -0700
committerGuang Zhu <guangzhu@google.com>2009-05-18 14:37:23 -0700
commit2a197b128a2317eec6efaa0a21e529cdf534c6f2 (patch)
tree5faf45378390c4124f15c8d9fa5d53c73c19cfca /tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java
parentb91081113692acc87ae67f235956ae1cecab68cc (diff)
Fixed IndexOutofBoundException, improved how memory information is captured (run GC first)
Diffstat (limited to 'tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java')
-rw-r--r--tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java
index caef86191c0d..f169a2664171 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java
@@ -223,7 +223,10 @@ public class LayoutTestsAutoTest extends ActivityInstrumentationTestCase2<TestSh
}
private String getExpectedResultFile(String test) {
- String shortName = test.substring(0, test.lastIndexOf('.'));
+ int pos = test.lastIndexOf('.');
+ if(pos == -1)
+ return null;
+ String shortName = test.substring(0, pos);
return shortName + "-expected.txt";
}
@@ -303,6 +306,10 @@ public class LayoutTestsAutoTest extends ActivityInstrumentationTestCase2<TestSh
});
String resultFile = getResultFile(test);
+ if(resultFile == null) {
+ //simply ignore this test
+ return;
+ }
if (mRebaselineResults) {
String expectedResultFile = getExpectedResultFile(test);
File f = new File(expectedResultFile);