summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/DumpRenderTree2/assets/run_apache2.py4
-rwxr-xr-xtests/DumpRenderTree2/assets/run_layout_tests.py6
-rw-r--r--tests/DumpRenderTree2/src/com/android/dumprendertree2/FsUtils.java2
-rw-r--r--tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java14
-rw-r--r--tests/DumpRenderTree2/src/com/android/dumprendertree2/ManagerService.java6
-rw-r--r--tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java2
-rw-r--r--tests/HwAccelerationTest/AndroidManifest.xml2
7 files changed, 30 insertions, 6 deletions
diff --git a/tests/DumpRenderTree2/assets/run_apache2.py b/tests/DumpRenderTree2/assets/run_apache2.py
index b4a8685..3806599 100755
--- a/tests/DumpRenderTree2/assets/run_apache2.py
+++ b/tests/DumpRenderTree2/assets/run_apache2.py
@@ -79,8 +79,8 @@ def main(run_cmd, options):
# complete set of tests and the required scripts.
directives += " -c \"DocumentRoot " + os.path.join(layout_tests_path, "http", "tests/") + "\""
directives += " -c \"Alias /LayoutTests " + layout_tests_path + "\""
- directives += " -c \"Alias /WebKitTools/DumpRenderTree/android " + \
- os.path.join(webkit_path, "WebKitTools", "DumpRenderTree", "android") + "\""
+ directives += " -c \"Alias /Tools/DumpRenderTree/android " + \
+ os.path.join(webkit_path, "Tools", "DumpRenderTree", "android") + "\""
directives += " -c \"Alias /ThirdPartyProject.prop " + \
os.path.join(webkit_path, "ThirdPartyProject.prop") + "\""
diff --git a/tests/DumpRenderTree2/assets/run_layout_tests.py b/tests/DumpRenderTree2/assets/run_layout_tests.py
index 3b8c09a..161416a 100755
--- a/tests/DumpRenderTree2/assets/run_layout_tests.py
+++ b/tests/DumpRenderTree2/assets/run_layout_tests.py
@@ -44,9 +44,15 @@ def main(path, options):
logging.info("Running the tests...")
logging.debug("Command = %s" % cmd)
(stdoutdata, stderrdata) = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
+ if stderrdata != "":
+ logging.info("Failed to start tests:\n%s", stderrdata)
+ return
if re.search("^INSTRUMENTATION_STATUS_CODE: -1", stdoutdata, re.MULTILINE) != None:
logging.info("Failed to run the tests. Is DumpRenderTree2 installed on the device?")
return
+ if re.search("^OK \([0-9]+ tests?\)", stdoutdata, re.MULTILINE) == None:
+ logging.info("DumpRenderTree2 failed to run correctly:\n%s", stdoutdata)
+ return
logging.info("Downloading the summaries...")
diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/FsUtils.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/FsUtils.java
index d1aba43..54cbfda 100644
--- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/FsUtils.java
+++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/FsUtils.java
@@ -63,7 +63,7 @@ public class FsUtils {
public static final String LOG_TAG = "FsUtils";
private static final String SCRIPT_URL = ForwarderManager.getHostSchemePort(false) +
- "WebKitTools/DumpRenderTree/android/get_layout_tests_dir_contents.php";
+ "Tools/DumpRenderTree/android/get_layout_tests_dir_contents.php";
private static final int HTTP_TIMEOUT_MS = 5000;
diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java
index d9f5dd4..f59da37 100644
--- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java
+++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java
@@ -398,6 +398,11 @@ public class LayoutTestsExecutor extends Activity {
}
private void startTests() {
+ // This is called when the tests are started and after each crash.
+ // We only send the reset message in the former case.
+ if (mCurrentTestIndex <= 0) {
+ sendResetMessage();
+ }
if (mCurrentTestIndex == 0) {
sendFirstTestMessage();
}
@@ -405,6 +410,15 @@ public class LayoutTestsExecutor extends Activity {
runNextTest();
}
+ private void sendResetMessage() {
+ try {
+ Message serviceMsg = Message.obtain(null, ManagerService.MSG_RESET);
+ mManagerServiceMessenger.send(serviceMsg);
+ } catch (RemoteException e) {
+ Log.e(LOG_TAG, "Error sending message to manager service:", e);
+ }
+ }
+
private void sendFirstTestMessage() {
try {
Message serviceMsg = Message.obtain(null, ManagerService.MSG_FIRST_TEST);
diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/ManagerService.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/ManagerService.java
index e4df62d..4783cc7 100644
--- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/ManagerService.java
+++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/ManagerService.java
@@ -66,6 +66,7 @@ public class ManagerService extends Service {
static final int MSG_ALL_TESTS_FINISHED = 1;
static final int MSG_FIRST_TEST = 2;
static final int MSG_CURRENT_TEST_CRASHED = 3;
+ static final int MSG_RESET = 4;
/**
* This handler is purely for IPC. It is used to create mMessenger
@@ -75,8 +76,11 @@ public class ManagerService extends Service {
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
- case MSG_FIRST_TEST:
+ case MSG_RESET:
mSummarizer.reset();
+ break;
+
+ case MSG_FIRST_TEST:
Bundle bundle = msg.getData();
ensureNextTestSetup(bundle.getString("firstTest"), bundle.getInt("index"));
break;
diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java
index 65c6964..bae8e6b 100644
--- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java
+++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java
@@ -568,7 +568,7 @@ public class Summarizer {
URL url = null;
try {
url = new URL("http", "localhost", ForwarderManager.HTTP_PORT,
- "/WebKitTools/DumpRenderTree/android/view_source.php?src=" +
+ "/Tools/DumpRenderTree/android/view_source.php?src=" +
relativePath);
} catch (MalformedURLException e) {
assert false : "relativePath=" + relativePath;
diff --git a/tests/HwAccelerationTest/AndroidManifest.xml b/tests/HwAccelerationTest/AndroidManifest.xml
index c1aa215..35f2b9b 100644
--- a/tests/HwAccelerationTest/AndroidManifest.xml
+++ b/tests/HwAccelerationTest/AndroidManifest.xml
@@ -376,7 +376,7 @@
<activity
android:name="ListActivity"
- android:label="_List">
+ android:label="__List">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />