Loading tests/DumpRenderTree2/assets/run_apache2.py +15 −6 Original line number Diff line number Diff line Loading @@ -26,12 +26,13 @@ import sys import os import subprocess import logging import optparse def main(): if len(sys.argv) < 2: def main(options, args): if len(args) < 1: run_cmd = "" else: run_cmd = sys.argv[1] run_cmd = args[0] # Setup logging class logging.basicConfig(level=logging.INFO, format='%(message)s') Loading @@ -53,8 +54,12 @@ def main(): android_tree_root = os.path.join(script_location, parent, parent, parent, parent, parent) android_tree_root = os.path.normpath(android_tree_root) # Paths relative to android_tree_root # If any of these is relative, then it's relative to ServerRoot (in our case android_tree_root) webkit_path = os.path.join("external", "webkit") if (options.tests_root_directory != None): # if options.tests_root_directory is absolute, os.getcwd() is discarded! layout_tests_path = os.path.normpath(os.path.join(os.getcwd(), options.tests_root_directory)) else: layout_tests_path = os.path.join(webkit_path, "LayoutTests") http_conf_path = os.path.join(layout_tests_path, "http", "conf") Loading Loading @@ -121,4 +126,8 @@ def main(): logging.info("OK") if __name__ == "__main__": main(); option_parser = optparse.OptionParser(usage="Usage: %prog [options] start|stop|restart") 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") options, args = option_parser.parse_args(); main(options, args); tests/DumpRenderTree2/assets/run_layout_tests.py +10 −1 Original line number Diff line number Diff line Loading @@ -32,8 +32,15 @@ def main(options, args): tmpdir = tempfile.gettempdir() if options.tests_root_directory != None: # if options.tests_root_directory is absolute, os.getcwd() is discarded! tests_root_directory = os.path.normpath(os.path.join(os.getcwd(), options.tests_root_directory)) server_options = " --tests-root-directory=" + tests_root_directory else: server_options = ""; # Restart the server cmd = os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), "run_apache2.py") + " restart" cmd = os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), "run_apache2.py") + server_options + " restart" os.system(cmd); # Run the tests in path Loading Loading @@ -73,5 +80,7 @@ if __name__ == "__main__": option_parser = optparse.OptionParser(usage="Usage: %prog [options] test-relative-path") option_parser.add_option("", "--show-results-in-browser", default="true", 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") options, args = option_parser.parse_args(); main(options, args); Loading
tests/DumpRenderTree2/assets/run_apache2.py +15 −6 Original line number Diff line number Diff line Loading @@ -26,12 +26,13 @@ import sys import os import subprocess import logging import optparse def main(): if len(sys.argv) < 2: def main(options, args): if len(args) < 1: run_cmd = "" else: run_cmd = sys.argv[1] run_cmd = args[0] # Setup logging class logging.basicConfig(level=logging.INFO, format='%(message)s') Loading @@ -53,8 +54,12 @@ def main(): android_tree_root = os.path.join(script_location, parent, parent, parent, parent, parent) android_tree_root = os.path.normpath(android_tree_root) # Paths relative to android_tree_root # If any of these is relative, then it's relative to ServerRoot (in our case android_tree_root) webkit_path = os.path.join("external", "webkit") if (options.tests_root_directory != None): # if options.tests_root_directory is absolute, os.getcwd() is discarded! layout_tests_path = os.path.normpath(os.path.join(os.getcwd(), options.tests_root_directory)) else: layout_tests_path = os.path.join(webkit_path, "LayoutTests") http_conf_path = os.path.join(layout_tests_path, "http", "conf") Loading Loading @@ -121,4 +126,8 @@ def main(): logging.info("OK") if __name__ == "__main__": main(); option_parser = optparse.OptionParser(usage="Usage: %prog [options] start|stop|restart") 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") options, args = option_parser.parse_args(); main(options, args);
tests/DumpRenderTree2/assets/run_layout_tests.py +10 −1 Original line number Diff line number Diff line Loading @@ -32,8 +32,15 @@ def main(options, args): tmpdir = tempfile.gettempdir() if options.tests_root_directory != None: # if options.tests_root_directory is absolute, os.getcwd() is discarded! tests_root_directory = os.path.normpath(os.path.join(os.getcwd(), options.tests_root_directory)) server_options = " --tests-root-directory=" + tests_root_directory else: server_options = ""; # Restart the server cmd = os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), "run_apache2.py") + " restart" cmd = os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), "run_apache2.py") + server_options + " restart" os.system(cmd); # Run the tests in path Loading Loading @@ -73,5 +80,7 @@ if __name__ == "__main__": option_parser = optparse.OptionParser(usage="Usage: %prog [options] test-relative-path") option_parser.add_option("", "--show-results-in-browser", default="true", 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") options, args = option_parser.parse_args(); main(options, args);