| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2006-2008 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 """A wrapper script to run layout tests on the buildbots. | 6 """A wrapper script to run layout tests on the buildbots. |
| 7 | 7 |
| 8 Runs the run_webkit_tests.py script found in webkit/tools/layout_tests above | 8 Runs the run_webkit_tests.py script found in webkit/tools/layout_tests above |
| 9 this script. For a complete list of command-line options, pass '--help' on the | 9 this script. For a complete list of command-line options, pass '--help' on the |
| 10 command line. | 10 command line. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 # Disable the page heap in case it got left enabled by some previous process. | 30 # Disable the page heap in case it got left enabled by some previous process. |
| 31 try: | 31 try: |
| 32 slave_utils.SetPageHeap(build_dir, 'test_shell.exe', False) | 32 slave_utils.SetPageHeap(build_dir, 'test_shell.exe', False) |
| 33 except chromium_utils.PathNotFound: | 33 except chromium_utils.PathNotFound: |
| 34 # If we don't have gflags.exe, report it but don't worry about it. | 34 # If we don't have gflags.exe, report it but don't worry about it. |
| 35 print 'Warning: Couldn\'t disable page heap, if it was already enabled.' | 35 print 'Warning: Couldn\'t disable page heap, if it was already enabled.' |
| 36 pass | 36 pass |
| 37 | 37 |
| 38 webkit_tests_dir = chromium_utils.FindUpward(build_dir, | 38 webkit_tests_dir = chromium_utils.FindUpward(build_dir, |
| 39 'webkit', 'tools', 'layout_tests') | 39 'webkit', 'tools', 'layout_tests') |
| 40 run_webkit_tests = os.path.join(webkit_tests_dir, 'run_webkit_tests.py') | 40 run_webkit_tests = os.path.join(webkit_tests_dir, 'run_webkit_tests.py') |
| 41 | 41 |
| 42 if sys.platform == 'win32': | 42 if sys.platform == 'win32': |
| 43 python_exe = chromium_utils.FindUpward(build_dir, | 43 python_exe = chromium_utils.FindUpward(build_dir, |
| 44 'third_party', | 44 'third_party', |
| 45 'python_24', | 45 'python_24', |
| 46 'python.exe') | 46 'python.exe') |
| 47 | 47 |
| 48 setup_mount = chromium_utils.FindUpward(build_dir, | 48 setup_mount = chromium_utils.FindUpward(build_dir, |
| 49 'third_party', | 49 'third_party', |
| 50 'cygwin', | 50 'cygwin', |
| 51 'setup_mount.bat') | 51 'setup_mount.bat') |
| 52 | 52 |
| 53 chromium_utils.RunCommand([setup_mount]) | 53 chromium_utils.RunCommand([setup_mount]) |
| 54 else: | 54 else: |
| 55 os.environ['PYTHONPATH'] = (chromium_utils.FindUpward(build_dir, | 55 os.environ['PYTHONPATH'] = (chromium_utils.FindUpward(build_dir, |
| 56 'tools', 'python') + ":" + os.environ.get('PYTHONPATH', '')) | 56 'tools', 'python') + ":" + os.environ.get('PYTHONPATH', '')) |
| 57 python_exe = 'python' | 57 python_exe = 'python' |
| 58 | 58 |
| 59 if sys.platform == 'linux2': | 59 if sys.platform == 'linux2': |
| 60 slave_name = slave_utils.SlaveBuildName(build_dir) | 60 slave_name = slave_utils.SlaveBuildName(build_dir) |
| 61 slave_utils.StartVirtualX(slave_name) | 61 slave_utils.StartVirtualX(slave_name) |
| 62 | 62 |
| 63 if sys.platform == 'darwin': |
| 64 # CrashReporter/ReportCrash take forever to walk through all of the |
| 65 # debugging symbols. Since we expect crashes, strip the debugging |
| 66 # symbols so that ReportCrash doesn't have so much to chew on. |
| 67 # TODO(mmentovai): instead of stripping symbols, come up with a better |
| 68 # way to suppress ReportCrash from within the TestShell process. |
| 69 test_shell_executable = chromium_utils.FindUpward(build_dir, |
| 70 'xcodebuild', |
| 71 options.target, |
| 72 'TestShell.app', |
| 73 'Contents', |
| 74 'MacOS', |
| 75 'TestShell') |
| 76 chromium_utils.RunCommand(['strip', '-S', test_shell_executable]) |
| 77 |
| 63 command = [python_exe, | 78 command = [python_exe, |
| 64 run_webkit_tests, | 79 run_webkit_tests, |
| 65 '--noshow-results', | 80 '--noshow-results', |
| 66 '--verbose' # Verbose output is enabled to support the dashboard. | 81 '--verbose' # Verbose output is enabled to support the dashboard. |
| 67 ] | 82 ] |
| 68 | 83 |
| 69 if options.results_directory: | 84 if options.results_directory: |
| 70 # run_webkit_tests expects the results directory to be either an absolute | 85 # run_webkit_tests expects the results directory to be either an absolute |
| 71 # path (starting with '/') or relative to Debug or Release. We expect it | 86 # path (starting with '/') or relative to Debug or Release. We expect it |
| 72 # to be relative to the build_dir, which is a parent of Debug or Release. | 87 # to be relative to the build_dir, which is a parent of Debug or Release. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 help='disable pixel-to-pixel PNG comparisons') | 141 help='disable pixel-to-pixel PNG comparisons') |
| 127 option_parser.add_option('', '--enable-pageheap', action='store_true', | 142 option_parser.add_option('', '--enable-pageheap', action='store_true', |
| 128 default=False, help='Enable page heap checking') | 143 default=False, help='Enable page heap checking') |
| 129 options, args = option_parser.parse_args() | 144 options, args = option_parser.parse_args() |
| 130 | 145 |
| 131 # Disable pageheap checking except on Windows. | 146 # Disable pageheap checking except on Windows. |
| 132 if sys.platform != 'win32': | 147 if sys.platform != 'win32': |
| 133 options.enable_pageheap = False | 148 options.enable_pageheap = False |
| 134 | 149 |
| 135 sys.exit(main(options, args)) | 150 sys.exit(main(options, args)) |
| OLD | NEW |