Merge "change webkit test data path" into honeycomb

This commit is contained in:
Guang Zhu
2011-01-12 23:29:53 -08:00
committed by Android (Google) Code Review
5 changed files with 20 additions and 20 deletions

View File

@@ -4,8 +4,8 @@
First, you need to get an SD card or sdcard image that has layout tests on it. First, you need to get an SD card or sdcard image that has layout tests on it.
Layout tests are in following directory: Layout tests are in following directory:
/sdcard/android/layout_tests /sdcard/webkit/layout_tests
For example, /sdcard/android/layout_tests/fast For example, /sdcard/webkit/layout_tests/fast
Usage: Usage:
Run all tests under fast/ directory: Run all tests under fast/ directory:
@@ -22,7 +22,7 @@
use --refresh-test-list option *once* to re-generate test list on the card. use --refresh-test-list option *once* to re-generate test list on the card.
Some other options are: Some other options are:
--rebaseline generates expected layout tests results under /sdcard/android/expected_result/ --rebaseline generates expected layout tests results under /sdcard/webkit/expected_result/
--time-out-ms (default is 8000 millis) for each test --time-out-ms (default is 8000 millis) for each test
--adb-options="-e" passes option string to adb --adb-options="-e" passes option string to adb
--results-directory=..., (default is ./layout-test-results) directory name under which results are stored. --results-directory=..., (default is ./layout-test-results) directory name under which results are stored.
@@ -57,8 +57,8 @@ def DumpRenderTreeFinished(adb_cmd):
output: adb_cmd string output: adb_cmd string
""" """
# pull /sdcard/android/running_test.txt, if the content is "#DONE", it's done # pull /sdcard/webkit/running_test.txt, if the content is "#DONE", it's done
shell_cmd_str = adb_cmd + " shell cat /sdcard/android/running_test.txt" shell_cmd_str = adb_cmd + " shell cat /sdcard/webkit/running_test.txt"
adb_output = subprocess.Popen(shell_cmd_str, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0] adb_output = subprocess.Popen(shell_cmd_str, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]
return adb_output.strip() == "#DONE" return adb_output.strip() == "#DONE"
@@ -207,7 +207,7 @@ def main(options, args):
# Get the running_test.txt # Get the running_test.txt
logging.error("DumpRenderTree crashed, output:\n" + adb_output) logging.error("DumpRenderTree crashed, output:\n" + adb_output)
shell_cmd_str = adb_cmd + " shell cat /sdcard/android/running_test.txt" shell_cmd_str = adb_cmd + " shell cat /sdcard/webkit/running_test.txt"
crashed_test = "" crashed_test = ""
while not crashed_test: while not crashed_test:
(crashed_test, err) = subprocess.Popen( (crashed_test, err) = subprocess.Popen(

View File

@@ -6,7 +6,7 @@
Usage: Usage:
Run a single page cycler test: Run a single page cycler test:
run_page_cycler.py "file:///sdcard/android/page_cycler/moz/start.html?auto=1\&iterations=10" run_page_cycler.py "file:///sdcard/webkit/page_cycler/moz/start.html\?auto=1\&iterations=10"
""" """
import logging import logging
@@ -32,7 +32,7 @@ def main(options, args):
# Include all tests if none are specified. # Include all tests if none are specified.
if not args: if not args:
print "need a URL, e.g. file:///sdcard/android/page_cycler/moz/start.html" print "need a URL, e.g. file:///sdcard/webkit/page_cycler/moz/start.html\?auto=1\&iterations=10"
sys.exit(1) sys.exit(1)
else: else:
path = ' '.join(args); path = ' '.join(args);

View File

@@ -181,7 +181,7 @@ public abstract class FileList extends ListActivity
} }
protected void setupPath() { protected void setupPath() {
mPath = Environment.getExternalStorageDirectory() + "/android/layout_tests"; mPath = Environment.getExternalStorageDirectory() + "/webkit/layout_tests";
mBaseLength = mPath.length(); mBaseLength = mPath.length();
} }
@@ -189,7 +189,7 @@ public abstract class FileList extends ListActivity
protected int mBaseLength; protected int mBaseLength;
protected String mFocusFile; protected String mFocusFile;
protected int mFocusIndex; protected int mFocusIndex;
private final static int OPEN_DIRECTORY = 0; private final static int OPEN_DIRECTORY = 0;
private final static int RUN_TESTS = 1; private final static int RUN_TESTS = 1;

View File

@@ -35,15 +35,15 @@ public class FsUtils {
private static final String LOGTAG = "FsUtils"; private static final String LOGTAG = "FsUtils";
static final String EXTERNAL_DIR = Environment.getExternalStorageDirectory().toString(); static final String EXTERNAL_DIR = Environment.getExternalStorageDirectory().toString();
static final String HTTP_TESTS_PREFIX = static final String HTTP_TESTS_PREFIX =
EXTERNAL_DIR + "/android/layout_tests/http/tests/"; EXTERNAL_DIR + "/webkit/layout_tests/http/tests/";
static final String HTTPS_TESTS_PREFIX = static final String HTTPS_TESTS_PREFIX =
EXTERNAL_DIR + "/android/layout_tests/http/tests/ssl/"; EXTERNAL_DIR + "/webkit/layout_tests/http/tests/ssl/";
static final String HTTP_LOCAL_TESTS_PREFIX = static final String HTTP_LOCAL_TESTS_PREFIX =
EXTERNAL_DIR + "/android/layout_tests/http/tests/local/"; EXTERNAL_DIR + "/webkit/layout_tests/http/tests/local/";
static final String HTTP_MEDIA_TESTS_PREFIX = static final String HTTP_MEDIA_TESTS_PREFIX =
EXTERNAL_DIR + "/android/layout_tests/http/tests/media/"; EXTERNAL_DIR + "/webkit/layout_tests/http/tests/media/";
static final String HTTP_WML_TESTS_PREFIX = static final String HTTP_WML_TESTS_PREFIX =
EXTERNAL_DIR + "/android/layout_tests/http/tests/wml/"; EXTERNAL_DIR + "/webkit/layout_tests/http/tests/wml/";
private FsUtils() { private FsUtils() {
//no creation of instances //no creation of instances

View File

@@ -129,11 +129,11 @@ public class LayoutTestsAutoTest extends ActivityInstrumentationTestCase2<TestSh
static final int DEFAULT_TIMEOUT_IN_MILLIS = 5000; static final int DEFAULT_TIMEOUT_IN_MILLIS = 5000;
static final String EXTERNAL_DIR = Environment.getExternalStorageDirectory().toString(); static final String EXTERNAL_DIR = Environment.getExternalStorageDirectory().toString();
static final String LAYOUT_TESTS_ROOT = EXTERNAL_DIR + "/android/layout_tests/"; static final String LAYOUT_TESTS_ROOT = EXTERNAL_DIR + "/webkit/layout_tests/";
static final String LAYOUT_TESTS_RESULT_DIR = EXTERNAL_DIR + "/android/layout_tests_results/"; static final String LAYOUT_TESTS_RESULT_DIR = EXTERNAL_DIR + "/webkit/layout_tests_results/";
static final String ANDROID_EXPECTED_RESULT_DIR = EXTERNAL_DIR + "/android/expected_results/"; static final String ANDROID_EXPECTED_RESULT_DIR = EXTERNAL_DIR + "/webkit/expected_results/";
static final String LAYOUT_TESTS_LIST_FILE = EXTERNAL_DIR + "/android/layout_tests_list.txt"; static final String LAYOUT_TESTS_LIST_FILE = EXTERNAL_DIR + "/webkit/layout_tests_list.txt";
static final String TEST_STATUS_FILE = EXTERNAL_DIR + "/android/running_test.txt"; static final String TEST_STATUS_FILE = EXTERNAL_DIR + "/webkit/running_test.txt";
static final String LAYOUT_TESTS_RESULTS_REFERENCE_FILES[] = { static final String LAYOUT_TESTS_RESULTS_REFERENCE_FILES[] = {
"results/layout_tests_passed.txt", "results/layout_tests_passed.txt",
"results/layout_tests_failed.txt", "results/layout_tests_failed.txt",