Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

Issue 339623002: Added support for versioning of layout test results of run-webkit-tests runs (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (C) 2010 Google Inc. All rights reserved. 1 # Copyright (C) 2010 Google Inc. All rights reserved.
2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze ged 2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze ged
3 # Copyright (C) 2011 Apple Inc. All rights reserved. 3 # Copyright (C) 2011 Apple Inc. All rights reserved.
4 # 4 #
5 # Redistribution and use in source and binary forms, with or without 5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are 6 # modification, are permitted provided that the following conditions are
7 # met: 7 # met:
8 # 8 #
9 # * Redistributions of source code must retain the above copyright 9 # * Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer. 10 # notice, this list of conditions and the following disclaimer.
(...skipping 22 matching lines...) Expand all
33 import os 33 import os
34 import sys 34 import sys
35 import traceback 35 import traceback
36 36
37 from webkitpy.common.host import Host 37 from webkitpy.common.host import Host
38 from webkitpy.layout_tests.controllers.manager import Manager 38 from webkitpy.layout_tests.controllers.manager import Manager
39 from webkitpy.layout_tests.models import test_run_results 39 from webkitpy.layout_tests.models import test_run_results
40 from webkitpy.layout_tests.port import configuration_options, platform_options 40 from webkitpy.layout_tests.port import configuration_options, platform_options
41 from webkitpy.layout_tests.views import buildbot_results 41 from webkitpy.layout_tests.views import buildbot_results
42 from webkitpy.layout_tests.views import printing 42 from webkitpy.layout_tests.views import printing
43 43 from webkitpy.layout_tests.generate_results_dashboard import GenerateDashBoard
44 44
45 _log = logging.getLogger(__name__) 45 _log = logging.getLogger(__name__)
46 46
47 47
48 48
49 def main(argv, stdout, stderr): 49 def main(argv, stdout, stderr):
50 options, args = parse_args(argv) 50 options, args = parse_args(argv)
51 51
52 if options.platform and 'test' in options.platform: 52 if options.platform and 'test' in options.platform:
53 # It's a bit lame to import mocks into real code, but this allows the us er 53 # It's a bit lame to import mocks into real code, but this allows the us er
(...skipping 16 matching lines...) Expand all
70 return test_run_results.UNEXPECTED_ERROR_EXIT_STATUS 70 return test_run_results.UNEXPECTED_ERROR_EXIT_STATUS
71 71
72 try: 72 try:
73 run_details = run(port, options, args, stderr) 73 run_details = run(port, options, args, stderr)
74 if ((run_details.exit_code not in test_run_results.ERROR_CODES or 74 if ((run_details.exit_code not in test_run_results.ERROR_CODES or
75 run_details.exit_code == test_run_results.EARLY_EXIT_STATUS) and 75 run_details.exit_code == test_run_results.EARLY_EXIT_STATUS) and
76 not run_details.initial_results.keyboard_interrupted): 76 not run_details.initial_results.keyboard_interrupted):
77 bot_printer = buildbot_results.BuildBotPrinter(stdout, options.debug _rwt_logging) 77 bot_printer = buildbot_results.BuildBotPrinter(stdout, options.debug _rwt_logging)
78 bot_printer.print_results(run_details) 78 bot_printer.print_results(run_details)
79 79
80 #Generate Dashboard if "--enable-versioned-results is passed"
81 if options.enable_versioned_results:
82 gen_dash_board = GenerateDashBoard(port)
83 gen_dash_board.generate()
84
80 return run_details.exit_code 85 return run_details.exit_code
86
81 # We need to still handle KeyboardInterrupt, atleast for webkitpy unittest c ases. 87 # We need to still handle KeyboardInterrupt, atleast for webkitpy unittest c ases.
82 except KeyboardInterrupt: 88 except KeyboardInterrupt:
83 return test_run_results.INTERRUPTED_EXIT_STATUS 89 return test_run_results.INTERRUPTED_EXIT_STATUS
84 except test_run_results.TestRunException as e: 90 except test_run_results.TestRunException as e:
85 print >> stderr, e.msg 91 print >> stderr, e.msg
86 return e.code 92 return e.code
87 except BaseException as e: 93 except BaseException as e:
88 if isinstance(e, Exception): 94 if isinstance(e, Exception):
89 print >> stderr, '\n%s raised: %s' % (e.__class__.__name__, str(e)) 95 print >> stderr, '\n%s raised: %s' % (e.__class__.__name__, str(e))
90 traceback.print_exc(file=stderr) 96 traceback.print_exc(file=stderr)
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 help="Use the specified port's baselines first"), 165 help="Use the specified port's baselines first"),
160 optparse.make_option("--no-show-results", action="store_false", 166 optparse.make_option("--no-show-results", action="store_false",
161 default=True, dest="show_results", 167 default=True, dest="show_results",
162 help="Don't launch a browser with results after the tests " 168 help="Don't launch a browser with results after the tests "
163 "are done"), 169 "are done"),
164 optparse.make_option("--full-results-html", action="store_true", 170 optparse.make_option("--full-results-html", action="store_true",
165 default=False, 171 default=False,
166 help="Show all failures in results.html, rather than only regression s"), 172 help="Show all failures in results.html, rather than only regression s"),
167 optparse.make_option("--clobber-old-results", action="store_true", 173 optparse.make_option("--clobber-old-results", action="store_true",
168 default=False, help="Clobbers test results from previous runs."), 174 default=False, help="Clobbers test results from previous runs."),
175 optparse.make_option("--enable-versioned-results", action="store_true",
176 default=True, help="Archive the test results for later access."),
Dirk Pranke 2014/06/17 17:58:58 did you mean for the default to be False? Otherwis
patro 2014/07/15 10:36:57 Yes it must be default=False
169 optparse.make_option("--smoke", action="store_true", 177 optparse.make_option("--smoke", action="store_true",
170 help="Run just the SmokeTests"), 178 help="Run just the SmokeTests"),
171 optparse.make_option("--no-smoke", dest="smoke", action="store_false", 179 optparse.make_option("--no-smoke", dest="smoke", action="store_false",
172 help="Do not run just the SmokeTests"), 180 help="Do not run just the SmokeTests"),
173 ])) 181 ]))
174 182
175 option_group_definitions.append(("Testing Options", [ 183 option_group_definitions.append(("Testing Options", [
176 optparse.make_option("--build", dest="build", 184 optparse.make_option("--build", dest="build",
177 action="store_true", default=True, 185 action="store_true", default=True,
178 help="Check to ensure the build is up-to-date (default)."), 186 help="Check to ensure the build is up-to-date (default)."),
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 printer.print_config(port.results_directory()) 381 printer.print_config(port.results_directory())
374 382
375 run_details = manager.run(args) 383 run_details = manager.run(args)
376 _log.debug("Testing completed, Exit status: %d" % run_details.exit_code) 384 _log.debug("Testing completed, Exit status: %d" % run_details.exit_code)
377 return run_details 385 return run_details
378 finally: 386 finally:
379 printer.cleanup() 387 printer.cleanup()
380 388
381 if __name__ == '__main__': 389 if __name__ == '__main__':
382 sys.exit(main(sys.argv[1:], sys.stdout, sys.stderr)) 390 sys.exit(main(sys.argv[1:], sys.stdout, sys.stderr))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698