OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 2 |
| 3 # Copyright 2014 The Crashpad Authors. All rights reserved. |
| 4 # |
| 5 # Licensed under the Apache License, Version 2.0 (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 |
| 8 # |
| 9 # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 # |
| 11 # Unless required by applicable law or agreed to in writing, software |
| 12 # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 # See the License for the specific language governing permissions and |
| 15 # limitations under the License. |
| 16 |
| 17 import os |
| 18 import subprocess |
| 19 import sys |
| 20 |
| 21 script_dir = os.path.dirname(__file__) |
| 22 crashpad_dir = os.path.dirname(script_dir) if script_dir is not '' else '..' |
| 23 |
| 24 |
| 25 # This script is primarily used from the waterfall so that the list of tests |
| 26 # that are run is maintained in-tree, rather than in a separate infrastructure |
| 27 # location in the recipe. |
| 28 def main(args): |
| 29 if len(args) != 1: |
| 30 print >>sys.stderr, 'usage: run_tests.py {Debug|Release}' |
| 31 return 1; |
| 32 binary_dir = os.path.join(crashpad_dir, 'out', args[0]) |
| 33 tests = [ |
| 34 'client_test', |
| 35 'minidump_test', |
| 36 'snapshot_test', |
| 37 'util_test', |
| 38 ] |
| 39 for test in tests: |
| 40 print '-' * 80 |
| 41 print test |
| 42 print '-' * 80 |
| 43 subprocess.check_call(os.path.join(binary_dir, test)) |
| 44 return 0 |
| 45 |
| 46 |
| 47 if __name__ == '__main__': |
| 48 sys.exit(main(sys.argv[1:])) |
OLD | NEW |