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

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

Issue 1708973002: Add a useful error message for run-webkit-tests broken --target handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 if options.platform and 'test' in options.platform and not 'browser_test' in options.platform: 53 if options.platform and 'test' in options.platform and not 'browser_test' in options.platform:
54 # It's a bit lame to import mocks into real code, but this allows the us er 54 # It's a bit lame to import mocks into real code, but this allows the us er
55 # to run tests against the test platform interactively, which is useful for 55 # to run tests against the test platform interactively, which is useful for
56 # debugging test failures. 56 # debugging test failures.
57 from webkitpy.common.host_mock import MockHost 57 from webkitpy.common.host_mock import MockHost
58 host = MockHost() 58 host = MockHost()
59 else: 59 else:
60 host = Host() 60 host = Host()
61 61
62 try: 62 try:
63 # TODO: crbug.com/539509 - Drop this check and make --target work proper ly.
64 if options.configuration not in (None, 'Debug', 'Release', 'Debug_x64', 'Release_x64'):
65 raise NotImplementedError('--target must be either "Debug" or "Relea se"; other values do not work\n.'
66 'Use multiple //out directories for multip le builds if necessary.\n'
67 'See crbug.com/539509.')
68
63 port = host.port_factory.get(options.platform, options) 69 port = host.port_factory.get(options.platform, options)
64 except NotImplementedError, e: 70 except NotImplementedError, e:
65 # FIXME: is this the best way to handle unsupported port names? 71 # FIXME: is this the best way to handle unsupported port names?
66 print >> stderr, str(e) 72 print >> stderr, str(e)
67 return test_run_results.UNEXPECTED_ERROR_EXIT_STATUS 73 return test_run_results.UNEXPECTED_ERROR_EXIT_STATUS
68 74
69 try: 75 try:
70 return run(port, options, args, stderr, stdout).exit_code 76 return run(port, options, args, stderr, stdout).exit_code
71 77
72 # We need to still handle KeyboardInterrupt, atleast for webkitpy unittest c ases. 78 # We need to still handle KeyboardInterrupt, atleast for webkitpy unittest c ases.
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 _log.debug("\t%s" % process) 409 _log.debug("\t%s" % process)
404 410
405 return run_details 411 return run_details
406 412
407 finally: 413 finally:
408 printer.cleanup() 414 printer.cleanup()
409 415
410 if __name__ == '__main__': 416 if __name__ == '__main__':
411 exit_code = main(sys.argv[1:], sys.stdout, sys.stderr) 417 exit_code = main(sys.argv[1:], sys.stdout, sys.stderr)
412 sys.exit(exit_code) 418 sys.exit(exit_code)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698