diff options
author | Steve Block <steveblock@google.com> | 2010-07-12 17:50:06 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-07-12 18:00:34 +0100 |
commit | a88837573e4b99dafd901cfc36589e3ab9449873 (patch) | |
tree | 355931558746c3fb98b03cf0d49cb878ffe42cac /tests/DumpRenderTree | |
parent | 59c76b87fd575046f967b507f3882cea010f4b88 (diff) | |
download | frameworks_base-a88837573e4b99dafd901cfc36589e3ab9449873.zip frameworks_base-a88837573e4b99dafd901cfc36589e3ab9449873.tar.gz frameworks_base-a88837573e4b99dafd901cfc36589e3ab9449873.tar.bz2 |
Update DumpRenderTree to look in platform/android for Android-specific results
Change-Id: I32044fc8e22d419762e275cd69b0c785a7f4c8a5
Diffstat (limited to 'tests/DumpRenderTree')
-rw-r--r-- | tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java index fabbf89..68d01d4 100644 --- a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java +++ b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java @@ -222,14 +222,22 @@ public class LayoutTestsAutoTest extends ActivityInstrumentationTestCase2<TestSh // The generic result is at <path>/<name>-expected.txt // First try the Android-specific result at // platform/android-<js-engine>/<path>/<name>-expected.txt + // then + // platform/android/<path>/<name>-expected.txt int pos = test.lastIndexOf('.'); if (pos == -1) return null; String genericExpectedResult = test.substring(0, pos) + "-expected.txt"; String androidExpectedResultsDir = "platform/android-" + mJsEngine + "/"; - String androidExpectedResult = - genericExpectedResult.replaceFirst(LAYOUT_TESTS_ROOT, LAYOUT_TESTS_ROOT + androidExpectedResultsDir); + String androidExpectedResult = genericExpectedResult.replaceFirst(LAYOUT_TESTS_ROOT, + LAYOUT_TESTS_ROOT + androidExpectedResultsDir); File f = new File(androidExpectedResult); + if (f.exists()) + return androidExpectedResult; + androidExpectedResultsDir = "platform/android/"; + androidExpectedResult = genericExpectedResult.replaceFirst(LAYOUT_TESTS_ROOT, + LAYOUT_TESTS_ROOT + androidExpectedResultsDir); + f = new File(androidExpectedResult); return f.exists() ? androidExpectedResult : genericExpectedResult; } |