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

Side by Side Diff: third_party/typ/run

Issue 660133004: Roll typ to v0.8.5 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « third_party/typ/README.chromium ('k') | third_party/typ/setup.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 2
3 from __future__ import print_function 3 from __future__ import print_function
4 4
5 import argparse 5 import argparse
6 import os 6 import os
7 import subprocess 7 import subprocess
8 import sys 8 import sys
9 9
10 from tools import cov 10 from tools import cov
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 call([sys.executable, 'setup.py', 'install'] + argv) 132 call([sys.executable, 'setup.py', 'install'] + argv)
133 133
134 134
135 def run_lint(args): 135 def run_lint(args):
136 call('pylint --rcfile=pylintrc */*.py */*/*.py', shell=True) 136 call('pylint --rcfile=pylintrc */*.py */*/*.py', shell=True)
137 call('pep8 *.py */*.py */*/*.py', shell=True) 137 call('pep8 *.py */*.py */*/*.py', shell=True)
138 138
139 139
140 def run_tests(args): 140 def run_tests(args):
141 # Tests that we can run the command line directly if typ is in sys.path. 141 # Tests that we can run the command line directly if typ is in sys.path.
142 call(['python', os.path.join('typ', 'cmdline.py'), 142 call(['python', os.path.join('typ', 'runner.py'),
143 'typ.tests.main_test.TestMain.test_basic']) 143 'typ.tests.main_test.TestMain.test_basic'])
144 144
145 # Test that we can run the command line directly if typ is not in sys.path. 145 # Test that we can run the command line directly if typ is not in sys.path.
146 repo_dir = os.path.abspath(os.path.dirname(__file__)) 146 repo_dir = os.path.abspath(os.path.dirname(__file__))
147 home_dir = os.environ['HOME'] 147 home_dir = os.environ['HOME']
148 call(['python', os.path.join(repo_dir, 'typ', 'cmdline.py'), 148 call(['python', os.path.join(repo_dir, 'typ', 'runner.py'),
149 'typ.tests.main_test.TestMain.test_basic'], cwd=home_dir) 149 'typ.tests.main_test.TestMain.test_basic'], cwd=home_dir)
150 150
151 # Now run all the tests under Python2 and Python3. 151 # Now run all the tests under Python2 and Python3.
152 call(['python', '-m', 'typ']) 152 call(['python', '-m', 'typ'])
153 if has_python34: 153 if has_python34:
154 call(['python3', '-m', 'typ']) 154 call(['python3', '-m', 'typ'])
155 155
156 156
157 if __name__ == '__main__': 157 if __name__ == '__main__':
158 sys.exit(main(sys.argv[1:])) 158 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « third_party/typ/README.chromium ('k') | third_party/typ/setup.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698