OLD | NEW |
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 Loading... |
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 | |
69 port = host.port_factory.get(options.platform, options) | 63 port = host.port_factory.get(options.platform, options) |
70 except NotImplementedError, e: | 64 except NotImplementedError, e: |
71 # FIXME: is this the best way to handle unsupported port names? | 65 # FIXME: is this the best way to handle unsupported port names? |
72 print >> stderr, str(e) | 66 print >> stderr, str(e) |
73 return test_run_results.UNEXPECTED_ERROR_EXIT_STATUS | 67 return test_run_results.UNEXPECTED_ERROR_EXIT_STATUS |
74 | 68 |
75 try: | 69 try: |
76 return run(port, options, args, stderr, stdout).exit_code | 70 return run(port, options, args, stderr, stdout).exit_code |
77 | 71 |
78 # We need to still handle KeyboardInterrupt, atleast for webkitpy unittest c
ases. | 72 # We need to still handle KeyboardInterrupt, atleast for webkitpy unittest c
ases. |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 _log.debug("\t%s" % process) | 403 _log.debug("\t%s" % process) |
410 | 404 |
411 return run_details | 405 return run_details |
412 | 406 |
413 finally: | 407 finally: |
414 printer.cleanup() | 408 printer.cleanup() |
415 | 409 |
416 if __name__ == '__main__': | 410 if __name__ == '__main__': |
417 exit_code = main(sys.argv[1:], sys.stdout, sys.stderr) | 411 exit_code = main(sys.argv[1:], sys.stdout, sys.stderr) |
418 sys.exit(exit_code) | 412 sys.exit(exit_code) |
OLD | NEW |