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

Side by Side Diff: mojo/tools/test_runner.py

Issue 878933003: Move the apptest runner and parts of mopy to the public SDK. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « mojo/tools/run_mojo_python_tests.py ('k') | mojo/tools/upload_shell_binary.py » ('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 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 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 "smart" test runner for gtest unit tests (that caches successes).""" 6 """A "smart" test runner for gtest unit tests (that caches successes)."""
7 7
8 import argparse 8 import argparse
9 import ast 9 import ast
10 import logging 10 import logging
11 import os 11 import os
12 import platform 12 import platform
13 import subprocess 13 import subprocess
14 import sys 14 import sys
15 15
16 _logging = logging.getLogger() 16 _logging = logging.getLogger()
17 17
18 import add_sdk_tools_to_path
18 import mopy.gtest 19 import mopy.gtest
19 from mopy.paths import Paths 20 from mopy.paths import Paths
20 from mopy.transitive_hash import file_hash, transitive_hash 21
22 from mopy_internal.transitive_hash import file_hash, transitive_hash
21 23
22 paths = Paths() 24 paths = Paths()
23 25
24 def main(): 26 def main():
25 logging.basicConfig() 27 logging.basicConfig()
26 # Uncomment to debug: 28 # Uncomment to debug:
27 # _logging.setLevel(logging.DEBUG) 29 # _logging.setLevel(logging.DEBUG)
28 30
29 parser = argparse.ArgumentParser( 31 parser = argparse.ArgumentParser(
30 description="A 'smart' test runner for gtest unit tests (that caches " 32 description="A 'smart' test runner for gtest unit tests (that caches "
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 print " Failed to start test" 142 print " Failed to start test"
141 return 1 143 return 1
142 print "All tests succeeded" 144 print "All tests succeeded"
143 if successes_cache_file: 145 if successes_cache_file:
144 successes_cache_file.close() 146 successes_cache_file.close()
145 147
146 return 0 148 return 0
147 149
148 if __name__ == '__main__': 150 if __name__ == '__main__':
149 sys.exit(main()) 151 sys.exit(main())
OLDNEW
« no previous file with comments | « mojo/tools/run_mojo_python_tests.py ('k') | mojo/tools/upload_shell_binary.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698