| OLD | NEW |
| (Empty) | |
| 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. |
| 5 |
| 6 """A wrapper script to check the test_expectations.txt file for errors.""" |
| 7 |
| 8 import optparse |
| 9 import os |
| 10 import sys |
| 11 |
| 12 from common import chromium_utils |
| 13 from slave import slave_utils |
| 14 |
| 15 |
| 16 def layout_test(options, args): |
| 17 """Parse options and call run_webkit_tests.py, using Python from the tree.""" |
| 18 build_dir = os.path.abspath(options.build_dir) |
| 19 webkit_tests_dir = chromium_utils.FindUpward(build_dir, |
| 20 'webkit', 'tools', 'layout_tests') |
| 21 run_webkit_tests = os.path.join(webkit_tests_dir, 'run_webkit_tests.py') |
| 22 command = [run_webkit_tests, '--lint-test-files', '--chromium'] |
| 23 |
| 24 return slave_utils.RunPythonCommandInBuildDir(build_dir, options.target, |
| 25 command) |
| 26 |
| 27 def main(): |
| 28 option_parser = optparse.OptionParser() |
| 29 option_parser.add_option('', '--build-dir', default='webkit', |
| 30 help='path to main build directory (the parent of ' |
| 31 'the Release or Debug directory)') |
| 32 |
| 33 # Note that --target isn't needed for --lint-test-files, but the |
| 34 # RunPythonCommandInBuildDir() will get upset if we don't say something. |
| 35 option_parser.add_option('', '--target', default='release', |
| 36 help='DumpRenderTree build configuration (Release or Debug)') |
| 37 |
| 38 options, args = option_parser.parse_args() |
| 39 return layout_test(options, args) |
| 40 |
| 41 if '__main__' == __name__: |
| 42 sys.exit(main()) |
| OLD | NEW |