summaryrefslogtreecommitdiffstats
path: root/WebKitTools/Scripts/webkitpy/layout_tests/driver_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'WebKitTools/Scripts/webkitpy/layout_tests/driver_test.py')
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/driver_test.py28
1 files changed, 16 insertions, 12 deletions
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/driver_test.py b/WebKitTools/Scripts/webkitpy/layout_tests/driver_test.py
index 6e4ba99..633dfe8 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/driver_test.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/driver_test.py
@@ -42,7 +42,8 @@ import port
def run_tests(port, options, tests):
# |image_path| is a path to the image capture from the driver.
image_path = 'image_result.png'
- driver = port.start_driver(image_path, None)
+ driver = port.create_driver(image_path, None)
+ driver.start()
for t in tests:
uri = port.filename_to_uri(os.path.join(port.layout_tests_dir(), t))
print "uri: " + uri
@@ -58,20 +59,23 @@ def run_tests(port, options, tests):
print ''.join(err)
print '"""'
print
+ driver.stop()
if __name__ == '__main__':
- optparser = optparse.OptionParser()
- optparser.add_option('-p', '--platform', action='store', default='mac',
- help='Platform to test (e.g., "mac", "chromium-mac", etc.')
- optparser.add_option('-t', '--target', action='store', default='Release',
- help='build type ("Debug" or "Release")')
- optparser.add_option('', '--timeout', action='store', default='2000',
- help='test timeout in milliseconds (2000 by default)')
- optparser.add_option('', '--wrapper', action='store')
- optparser.add_option('', '--no-pixel-tests', action='store_true',
- default=False,
- help='disable pixel-to-pixel PNG comparisons')
+ # FIXME: configuration_options belong in a shared location.
+ configuration_options = [
+ optparse.make_option('--debug', action='store_const', const='Debug', dest="configuration", help='Set the configuration to Debug'),
+ optparse.make_option('--release', action='store_const', const='Release', dest="configuration", help='Set the configuration to Release'),
+ ]
+ misc_options = [
+ optparse.make_option('-p', '--platform', action='store', default='mac', help='Platform to test (e.g., "mac", "chromium-mac", etc.'),
+ optparse.make_option('--timeout', action='store', default='2000', help='test timeout in milliseconds (2000 by default)'),
+ optparse.make_option('--wrapper', action='store'),
+ optparse.make_option('--no-pixel-tests', action='store_true', default=False, help='disable pixel-to-pixel PNG comparisons'),
+ ]
+ option_list = configuration_options + misc_options
+ optparser = optparse.OptionParser(option_list=option_list)
options, args = optparser.parse_args()
p = port.get(options.platform, options)
run_tests(p, options, args)