Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: build/run_tests.py

Issue 992503002: Locate test data more robustly (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: 2015 Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | util/net/http_body_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 subprocess 18 import subprocess
19 import sys 19 import sys
20 20
21 21
22 # This script is primarily used from the waterfall so that the list of tests 22 # 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 23 # that are run is maintained in-tree, rather than in a separate infrastructure
24 # location in the recipe. 24 # location in the recipe.
25 def main(args): 25 def main(args):
26 if len(args) != 1: 26 if len(args) != 1:
27 print >>sys.stderr, 'usage: run_tests.py {Debug|Release}' 27 print >>sys.stderr, 'usage: run_tests.py {Debug|Release}'
28 return 1; 28 return 1;
29 29
30 # Until https://code.google.com/p/crashpad/issues/detail?id=4 is fixed, tests
31 # need to be run from a specific working directory.
32 crashpad_dir = \ 30 crashpad_dir = \
33 os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir) 31 os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir)
34 os.chdir(crashpad_dir)
35 32
36 binary_dir = os.path.join('out', args[0]) 33 binary_dir = os.path.join(crashpad_dir, 'out', args[0])
37 tests = [ 34 tests = [
38 'crashpad_client_test', 35 'crashpad_client_test',
39 'crashpad_minidump_test', 36 'crashpad_minidump_test',
40 'crashpad_snapshot_test', 37 'crashpad_snapshot_test',
41 'crashpad_util_test', 38 'crashpad_util_test',
42 ] 39 ]
43 for test in tests: 40 for test in tests:
44 print '-' * 80 41 print '-' * 80
45 print test 42 print test
46 print '-' * 80 43 print '-' * 80
47 subprocess.check_call(os.path.join(binary_dir, test)) 44 subprocess.check_call(os.path.join(binary_dir, test))
48 return 0 45 return 0
49 46
50 47
51 if __name__ == '__main__': 48 if __name__ == '__main__':
52 sys.exit(main(sys.argv[1:])) 49 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | util/net/http_body_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698