| 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 subprocess | 19 import subprocess |
| 19 import sys | 20 import sys |
| 20 | 21 |
| 21 | 22 |
| 22 # 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 |
| 23 # 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 |
| 24 # location in the recipe. | 25 # location in the recipe. |
| 25 def main(args): | 26 def main(args): |
| 26 if len(args) != 1: | 27 if len(args) != 1: |
| 27 print >>sys.stderr, 'usage: run_tests.py {Debug|Release}' | 28 print >>sys.stderr, 'usage: run_tests.py {Debug|Release}' |
| (...skipping 15 matching lines...) Expand all Loading... |
| 43 | 44 |
| 44 binary_dir = os.path.join(out_dir, args[0]) | 45 binary_dir = os.path.join(out_dir, args[0]) |
| 45 | 46 |
| 46 tests = [ | 47 tests = [ |
| 47 'crashpad_client_test', | 48 'crashpad_client_test', |
| 48 'crashpad_minidump_test', | 49 'crashpad_minidump_test', |
| 49 'crashpad_snapshot_test', | 50 'crashpad_snapshot_test', |
| 50 'crashpad_test_test', | 51 'crashpad_test_test', |
| 51 'crashpad_util_test', | 52 'crashpad_util_test', |
| 52 ] | 53 ] |
| 54 if platform.system() == 'Windows': |
| 55 tests += [ |
| 56 'crashpad_handler_test', |
| 57 ] |
| 53 for test in tests: | 58 for test in tests: |
| 54 print '-' * 80 | 59 print '-' * 80 |
| 55 print test | 60 print test |
| 56 print '-' * 80 | 61 print '-' * 80 |
| 57 subprocess.check_call(os.path.join(binary_dir, test)) | 62 subprocess.check_call(os.path.join(binary_dir, test)) |
| 58 return 0 | 63 return 0 |
| 59 | 64 |
| 60 | 65 |
| 61 if __name__ == '__main__': | 66 if __name__ == '__main__': |
| 62 sys.exit(main(sys.argv[1:])) | 67 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |