diff options
author | Steve Block <steveblock@google.com> | 2010-10-18 13:27:39 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-10-18 20:20:43 +0100 |
commit | 24652bc958997dc32d5c8275f2f2ce38daf6e106 (patch) | |
tree | 06ee4baa7f2f8fc015fa4bccf7027909e3247746 /tests | |
parent | fc16915d327888e110d04564eed58306d6e8585b (diff) | |
download | frameworks_base-24652bc958997dc32d5c8275f2f2ce38daf6e106.zip frameworks_base-24652bc958997dc32d5c8275f2f2ce38daf6e106.tar.gz frameworks_base-24652bc958997dc32d5c8275f2f2ce38daf6e106.tar.bz2 |
Fix DumpRenderTree2 to correctly handle crashed tests
Change-Id: I894987d5b8f24ea31893aefe3cb6450c2736aa90
Diffstat (limited to 'tests')
-rw-r--r-- | tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java | 21 | ||||
-rw-r--r-- | tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java | 5 |
2 files changed, 17 insertions, 9 deletions
diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java index af8f6ea..58f7183 100644 --- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java +++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java @@ -404,23 +404,26 @@ public class LayoutTestsExecutor extends Activity { } private void startTests() { + if (mCurrentTestIndex == 0) { + sendFirstTestMessage(); + } + + runNextTest(); + } + + private void sendFirstTestMessage() { try { - Message serviceMsg = - Message.obtain(null, ManagerService.MSG_FIRST_TEST); + Message serviceMsg = Message.obtain(null, ManagerService.MSG_FIRST_TEST); Bundle bundle = new Bundle(); - if (!mTestsList.isEmpty()) { - bundle.putString("firstTest", mTestsList.get(0)); - bundle.putInt("index", mCurrentTestIndex); - } + bundle.putString("firstTest", mTestsList.get(0)); + bundle.putInt("index", mCurrentTestIndex); serviceMsg.setData(bundle); mManagerServiceMessenger.send(serviceMsg); } catch (RemoteException e) { - Log.e(LOG_TAG, "mCurrentTestRelativePath=" + mCurrentTestRelativePath, e); + Log.e(LOG_TAG, "Error sending message to manager service:", e); } - - runNextTest(); } private void runNextTest() { diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java index 8d01a53..bd8c4ad 100644 --- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java +++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java @@ -539,6 +539,11 @@ public class Summarizer { String textSource = result.getExpectedTextResultPath(); String imageSource = result.getExpectedImageResultPath(); + if (result.didCrash()) { + html.append("<span class=\"source\">Did not look for expected results</span>"); + return; + } + if (textSource == null) { // Show if a text result is missing. We may want to revisit this decision when we add // support for image results. |