OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 tool to run a chrome test executable, used by the buildbot slaves. | 6 """A tool to run a chrome test executable, used by the buildbot slaves. |
7 | 7 |
8 When this is run, the current directory (cwd) should be the outer build | 8 When this is run, the current directory (cwd) should be the outer build |
9 directory (e.g., chrome-release/build/). | 9 directory (e.g., chrome-release/build/). |
10 | 10 |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 # simulator and launch it, then dump the test results to stdout. | 653 # simulator and launch it, then dump the test results to stdout. |
654 | 654 |
655 # Note that the first object (build_dir) returned from the following | 655 # Note that the first object (build_dir) returned from the following |
656 # method invocations is ignored because only the app executable is needed. | 656 # method invocations is ignored because only the app executable is needed. |
657 _, app_exe_path = get_build_dir_and_exe_path_mac( | 657 _, app_exe_path = get_build_dir_and_exe_path_mac( |
658 options, | 658 options, |
659 options.target + '-iphonesimulator', | 659 options.target + '-iphonesimulator', |
660 test_name + '.app') | 660 test_name + '.app') |
661 | 661 |
662 _, test_exe_path = get_build_dir_and_exe_path_mac(options, | 662 _, test_exe_path = get_build_dir_and_exe_path_mac(options, |
663 options.target, | 663 os.path.join('ninja-iossim', options.target), |
664 'iossim') | 664 'iossim') |
665 command = [test_exe_path, | 665 command = [test_exe_path, |
666 '-d', device, | 666 '-d', device, |
667 '-s', ios_version, | 667 '-s', ios_version, |
668 app_exe_path, '--' | 668 app_exe_path, '--' |
669 ] | 669 ] |
670 command.extend(args[1:]) | 670 command.extend(args[1:]) |
671 | 671 |
672 if list_parsers(options.annotate): | 672 if list_parsers(options.annotate): |
673 return 0 | 673 return 0 |
674 results_tracker = create_results_tracker(get_parsers()['gtest'], options) | 674 results_tracker = create_results_tracker(get_parsers()['gtest'], options) |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1154 '%d new files were left in %s: Fix the tests to clean up themselves.' | 1154 '%d new files were left in %s: Fix the tests to clean up themselves.' |
1155 ) % ((new_temp_files - temp_files), tempfile.gettempdir()) | 1155 ) % ((new_temp_files - temp_files), tempfile.gettempdir()) |
1156 # TODO(maruel): Make it an error soon. Not yet since I want to iron out all | 1156 # TODO(maruel): Make it an error soon. Not yet since I want to iron out all |
1157 # the remaining cases before. | 1157 # the remaining cases before. |
1158 #result = 1 | 1158 #result = 1 |
1159 return result | 1159 return result |
1160 | 1160 |
1161 | 1161 |
1162 if '__main__' == __name__: | 1162 if '__main__' == __name__: |
1163 sys.exit(main()) | 1163 sys.exit(main()) |
OLD | NEW |