diff options
author | Steve Block <steveblock@google.com> | 2010-10-18 12:39:42 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-10-18 20:20:42 +0100 |
commit | fc16915d327888e110d04564eed58306d6e8585b (patch) | |
tree | 172e572e3ac82f76ba9eb504cb03d7731d2ce490 /tests/DumpRenderTree2 | |
parent | ae47ce00460538d7db688a269d8cbae5a2054b18 (diff) | |
download | frameworks_base-fc16915d327888e110d04564eed58306d6e8585b.zip frameworks_base-fc16915d327888e110d04564eed58306d6e8585b.tar.gz frameworks_base-fc16915d327888e110d04564eed58306d6e8585b.tar.bz2 |
Fix DumpRenderTree2 script to allow only one path to be specified
Change-Id: I4a85ff69554a9c76af0b2deea747b8414660fee2
Diffstat (limited to 'tests/DumpRenderTree2')
-rwxr-xr-x | tests/DumpRenderTree2/assets/run_layout_tests.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/tests/DumpRenderTree2/assets/run_layout_tests.py b/tests/DumpRenderTree2/assets/run_layout_tests.py index fe7bf55..0dfd229 100755 --- a/tests/DumpRenderTree2/assets/run_layout_tests.py +++ b/tests/DumpRenderTree2/assets/run_layout_tests.py @@ -25,14 +25,7 @@ RESULTS_ABSOLUTE_PATH = "/sdcard/layout-test-results/" DETAILS_HTML = "details.html" SUMMARY_TXT = "summary.txt" -def main(options, args): - if args: - path = " ".join(args); - else: - path = ""; - - logging.basicConfig(level=logging.INFO, format='%(message)s') - +def main(path, options): tmpdir = tempfile.gettempdir() # Restart the server @@ -86,4 +79,14 @@ if __name__ == "__main__": 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); + + logging.basicConfig(level=logging.INFO, format='%(message)s') + + if len(args) > 1: + logging.fatal("Usage: run_layout_tests.py [options] test-relative-path") + else: + if len(args) < 1: + path = ""; + else: + path = args[0] + main(path, options); |