diff options
Diffstat (limited to 'tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java')
-rw-r--r-- | tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java | 9 |
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 caef861..f169a26 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); |