summaryrefslogtreecommitdiffstats
path: root/tests/DumpRenderTree2
diff options
context:
space:
mode:
authorGuang Zhu <guangzhu@google.com>2010-09-27 11:58:15 -0700
committerGuang Zhu <guangzhu@google.com>2010-09-28 12:54:02 -0700
commit82c11b42f1564904eb4407d6e30a31ea02d81644 (patch)
tree3533f5ed9841269168fd6bd8d3bf54817c508b37 /tests/DumpRenderTree2
parent40f45eeeb4914511c0d4d749d1f4c768e82b79a3 (diff)
downloadframeworks_base-82c11b42f1564904eb4407d6e30a31ea02d81644.zip
frameworks_base-82c11b42f1564904eb4407d6e30a31ea02d81644.tar.gz
frameworks_base-82c11b42f1564904eb4407d6e30a31ea02d81644.tar.bz2
add multiple device support to layout test driver script
pass on the serial number onto adb command so that it don't get confused when multiple devices are connected Change-Id: I0b16f9da941d77425bcc5f782393f8800e035871
Diffstat (limited to 'tests/DumpRenderTree2')
-rwxr-xr-xtests/DumpRenderTree2/assets/run_layout_tests.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/DumpRenderTree2/assets/run_layout_tests.py b/tests/DumpRenderTree2/assets/run_layout_tests.py
index 0c63e47..303a054 100755
--- a/tests/DumpRenderTree2/assets/run_layout_tests.py
+++ b/tests/DumpRenderTree2/assets/run_layout_tests.py
@@ -45,7 +45,10 @@ def main(options, args):
os.system(cmd);
# Run the tests in path
- cmd = "adb shell am instrument "
+ adb_cmd = "adb"
+ if options.serial:
+ adb_cmd += " -s " + options.serial
+ cmd = adb_cmd + " shell am instrument "
cmd += "-e class com.android.dumprendertree2.scriptsupport.Starter#startLayoutTests "
cmd += "-e path \"" + path + "\" "
cmd += "-w com.android.dumprendertree2/com.android.dumprendertree2.scriptsupport.ScriptTestRunner"
@@ -61,13 +64,13 @@ def main(options, args):
# Download the txt summary to tmp folder
summary_txt_tmp_path = os.path.join(tmpdir, SUMMARY_TXT)
cmd = "rm -f " + summary_txt_tmp_path + ";"
- cmd += "adb pull " + RESULTS_ABSOLUTE_PATH + SUMMARY_TXT + " " + summary_txt_tmp_path
+ cmd += adb_cmd + " pull " + RESULTS_ABSOLUTE_PATH + SUMMARY_TXT + " " + summary_txt_tmp_path
subprocess.Popen(cmd, shell=True).wait()
# Download the html summary to tmp folder
details_html_tmp_path = os.path.join(tmpdir, DETAILS_HTML)
cmd = "rm -f " + details_html_tmp_path + ";"
- cmd += "adb pull " + RESULTS_ABSOLUTE_PATH + DETAILS_HTML + " " + details_html_tmp_path
+ cmd += adb_cmd + " pull " + RESULTS_ABSOLUTE_PATH + DETAILS_HTML + " " + details_html_tmp_path
subprocess.Popen(cmd, shell=True).wait()
# Print summary to console
@@ -86,5 +89,6 @@ if __name__ == "__main__":
help="Show the results the host's default web browser, default=true")
option_parser.add_option("", "--tests-root-directory",
help="The directory from which to take the tests, default is external/webkit/LayoutTests in this checkout of the Android tree")
+ option_parser.add_option("-s", "--serial", default=None, help="Specify the serial number of device to run test on")
options, args = option_parser.parse_args();
main(options, args);