OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright 2014 The Crashpad Authors. All rights reserved. | 3 # Copyright 2014 The Crashpad Authors. All rights reserved. |
4 # | 4 # |
5 # Licensed under the Apache License, Version 2.0 (the "License"); | 5 # Licensed under the Apache License, Version 2.0 (the "License"); |
6 # you may not use this file except in compliance with the License. | 6 # you may not use this file except in compliance with the License. |
7 # You may obtain a copy of the License at | 7 # You may obtain a copy of the License at |
8 # | 8 # |
9 # http://www.apache.org/licenses/LICENSE-2.0 | 9 # http://www.apache.org/licenses/LICENSE-2.0 |
10 # | 10 # |
11 # Unless required by applicable law or agreed to in writing, software | 11 # Unless required by applicable law or agreed to in writing, software |
12 # distributed under the License is distributed on an "AS IS" BASIS, | 12 # distributed under the License is distributed on an "AS IS" BASIS, |
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
14 # See the License for the specific language governing permissions and | 14 # See the License for the specific language governing permissions and |
15 # limitations under the License. | 15 # limitations under the License. |
16 | 16 |
17 import os | 17 import os |
18 import platform | 18 import platform |
19 import subprocess | 19 import subprocess |
20 import sys | 20 import sys |
21 | 21 |
22 | 22 |
23 # This script is primarily used from the waterfall so that the list of tests | 23 # This script is primarily used from the waterfall so that the list of tests |
24 # that are run is maintained in-tree, rather than in a separate infrastructure | 24 # that are run is maintained in-tree, rather than in a separate infrastructure |
25 # location in the recipe. | 25 # location in the recipe. |
26 def main(args): | 26 def main(args): |
27 if len(args) != 1: | 27 if len(args) != 1: |
28 print >>sys.stderr, 'usage: run_tests.py {Debug|Release}' | 28 print >> sys.stderr, \ |
29 return 1; | 29 'usage: run_tests.py {Debug|Release|Debug_x64|Release_x64}' |
| 30 return 1 |
30 | 31 |
31 crashpad_dir = \ | 32 crashpad_dir = \ |
32 os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir) | 33 os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir) |
33 | 34 |
34 # In a standalone Crashpad build, the out directory is in the Crashpad root. | 35 # In a standalone Crashpad build, the out directory is in the Crashpad root. |
35 out_dir = os.path.join(crashpad_dir, 'out') | 36 out_dir = os.path.join(crashpad_dir, 'out') |
36 if not os.path.exists(out_dir): | 37 if not os.path.exists(out_dir): |
37 # In an in-Chromium build, the out directory is in the Chromium root, and | 38 # In an in-Chromium build, the out directory is in the Chromium root, and |
38 # the Crashpad root is in third_party/crashpad/crashpad relative to the | 39 # the Crashpad root is in third_party/crashpad/crashpad relative to the |
39 # Chromium root. | 40 # Chromium root. |
(...skipping 14 matching lines...) Expand all Loading... |
54 for test in tests: | 55 for test in tests: |
55 print '-' * 80 | 56 print '-' * 80 |
56 print test | 57 print test |
57 print '-' * 80 | 58 print '-' * 80 |
58 subprocess.check_call(os.path.join(binary_dir, test)) | 59 subprocess.check_call(os.path.join(binary_dir, test)) |
59 return 0 | 60 return 0 |
60 | 61 |
61 | 62 |
62 if __name__ == '__main__': | 63 if __name__ == '__main__': |
63 sys.exit(main(sys.argv[1:])) | 64 sys.exit(main(sys.argv[1:])) |
OLD | NEW |