From 521d9a798613cc9ad850f42343d2fbfa6c98f5c7 Mon Sep 17 00:00:00 2001 From: Kristian Monsen Date: Tue, 25 May 2010 20:12:47 +0100 Subject: [PATCH] Display index and count when running layout tests Change-Id: I8b925784aead96a1be6344d654d0376dee2047eb --- .../android/dumprendertree/LayoutTestsAutoTest.java | 10 ++++++++-- .../com/android/dumprendertree/TestShellActivity.java | 11 ++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java index 6b9bd65bf5078..150d65cab4265 100644 --- a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java +++ b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java @@ -153,6 +153,8 @@ public class LayoutTestsAutoTest extends ActivityInstrumentationTestCase2(mTestList.subList(i+1, mTestList.size())); mTestListIgnoreResult = new Vector(mTestListIgnoreResult.subList(i+1, mTestListIgnoreResult.size())); + mResumeIndex = i; break; } } @@ -286,7 +290,7 @@ public class LayoutTestsAutoTest extends ActivityInstrumentationTestCase2 30) - title = "..."+title.substring(title.length()-30); - setTitle(title); + setTitle("Test " + mTestIndex + " of " + mTestCount + ": "+ title); if (mDumpTitleChanges) { mTitleChanges.append("TITLE CHANGED: "); mTitleChanges.append(title); @@ -842,6 +843,8 @@ public class TestShellActivity extends Activity implements LayoutTestController private String mSaveImagePath; private BufferedReader mTestListReader; private boolean mGetDrawtime; + private int mTestCount; + private int mTestIndex; // States private boolean mTimedOut; @@ -879,6 +882,8 @@ public class TestShellActivity extends Activity implements LayoutTestController static final String UI_AUTO_TEST = "UiAutoTest"; static final String GET_DRAW_TIME = "GetDrawTime"; static final String SAVE_IMAGE = "SaveImage"; + static final String TEST_COUNT = "TestCount"; + static final String TEST_INDEX = "TestIndex"; static final int DRAW_RUNS = 5; static final String DRAW_TIME_LOG = "/sdcard/android/page_draw_time.txt";