| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import optparse | 6 import optparse |
| 7 import os | 7 import os |
| 8 import subprocess | 8 import subprocess |
| 9 import sys | 9 import sys |
| 10 import time | 10 import time |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 # http://crbug.com/262379. | 60 # http://crbug.com/262379. |
| 61 {'name': 'graphics_3d', 'platform': ('win', 'linux')}, | 61 {'name': 'graphics_3d', 'platform': ('win', 'linux')}, |
| 62 # TODO(binji): These tests timeout on the trybots because the NEXEs take | 62 # TODO(binji): These tests timeout on the trybots because the NEXEs take |
| 63 # more than 40 seconds to load (!). See http://crbug.com/280753 | 63 # more than 40 seconds to load (!). See http://crbug.com/280753 |
| 64 {'name': 'nacl_io_test', 'platform': 'win', 'toolchain': 'glibc'}, | 64 {'name': 'nacl_io_test', 'platform': 'win', 'toolchain': 'glibc'}, |
| 65 # We don't test "getting_started/part1" because it would complicate the | 65 # We don't test "getting_started/part1" because it would complicate the |
| 66 # example. | 66 # example. |
| 67 # TODO(binji): figure out a way to inject the testing code without | 67 # TODO(binji): figure out a way to inject the testing code without |
| 68 # modifying the example; maybe an extension? | 68 # modifying the example; maybe an extension? |
| 69 {'name': 'part1'}, | 69 {'name': 'part1'}, |
| 70 # TODO(binji): loading nacl_io_test.pexe on win/linux is > 40 seconds. | |
| 71 # See http://crbug.com/315253 | |
| 72 {'name': 'nacl_io_test', 'platform': ('win', 'linux'), | |
| 73 'toolchain': 'pnacl', 'config': 'Release'}, | |
| 74 ] | 70 ] |
| 75 | 71 |
| 76 def ValidateToolchains(toolchains): | 72 def ValidateToolchains(toolchains): |
| 77 invalid_toolchains = set(toolchains) - set(ALL_TOOLCHAINS) | 73 invalid_toolchains = set(toolchains) - set(ALL_TOOLCHAINS) |
| 78 if invalid_toolchains: | 74 if invalid_toolchains: |
| 79 buildbot_common.ErrorExit('Invalid toolchain(s): %s' % ( | 75 buildbot_common.ErrorExit('Invalid toolchain(s): %s' % ( |
| 80 ', '.join(invalid_toolchains))) | 76 ', '.join(invalid_toolchains))) |
| 81 | 77 |
| 82 | 78 |
| 83 def GetServingDirForProject(desc): | 79 def GetServingDirForProject(desc): |
| (...skipping 17 matching lines...) Expand all Loading... |
| 101 buildbot_common.ErrorExit('Failed to find chrome browser using FindChrome.') | 97 buildbot_common.ErrorExit('Failed to find chrome browser using FindChrome.') |
| 102 | 98 |
| 103 args = [ | 99 args = [ |
| 104 sys.executable, | 100 sys.executable, |
| 105 browser_tester_py, | 101 browser_tester_py, |
| 106 '--browser_path', browser_path, | 102 '--browser_path', browser_path, |
| 107 '--timeout', '30.0', # seconds | 103 '--timeout', '30.0', # seconds |
| 108 # Prevent the infobar that shows up when requesting filesystem quota. | 104 # Prevent the infobar that shows up when requesting filesystem quota. |
| 109 '--browser_flag', '--unlimited-storage', | 105 '--browser_flag', '--unlimited-storage', |
| 110 '--enable_sockets', | 106 '--enable_sockets', |
| 107 # Prevent installing a new copy of PNaCl. |
| 108 '--browser_flag', '--disable-component-update', |
| 111 ] | 109 ] |
| 112 | 110 |
| 113 args.extend(['--serving_dir', GetServingDirForProject(desc)]) | 111 args.extend(['--serving_dir', GetServingDirForProject(desc)]) |
| 114 # Fall back on the example directory in the Chromium repo, to find test.js. | 112 # Fall back on the example directory in the Chromium repo, to find test.js. |
| 115 args.extend(['--serving_dir', GetRepoServingDirForProject(desc)]) | 113 args.extend(['--serving_dir', GetRepoServingDirForProject(desc)]) |
| 116 # If it is not found there, fall back on the dummy one (in this directory.) | 114 # If it is not found there, fall back on the dummy one (in this directory.) |
| 117 args.extend(['--serving_dir', SCRIPT_DIR]) | 115 args.extend(['--serving_dir', SCRIPT_DIR]) |
| 118 | 116 |
| 119 if toolchain == platform: | 117 if toolchain == platform: |
| 120 exe_dir = GetExecutableDirForProject(desc, toolchain, config) | 118 exe_dir = GetExecutableDirForProject(desc, toolchain, config) |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 | 345 |
| 348 | 346 |
| 349 if __name__ == '__main__': | 347 if __name__ == '__main__': |
| 350 script_name = os.path.basename(sys.argv[0]) | 348 script_name = os.path.basename(sys.argv[0]) |
| 351 try: | 349 try: |
| 352 sys.exit(main(sys.argv)) | 350 sys.exit(main(sys.argv)) |
| 353 except parse_dsc.ValidationError as e: | 351 except parse_dsc.ValidationError as e: |
| 354 buildbot_common.ErrorExit('%s: %s' % (script_name, e)) | 352 buildbot_common.ErrorExit('%s: %s' % (script_name, e)) |
| 355 except KeyboardInterrupt: | 353 except KeyboardInterrupt: |
| 356 buildbot_common.ErrorExit('%s: interrupted' % script_name) | 354 buildbot_common.ErrorExit('%s: interrupted' % script_name) |
| OLD | NEW |