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

Side by Side Diff: testing/scripts/run_devtools_check.py

Issue 2486903002: DevTools: Add support for installing node and running eslint over devtools. (Closed)
Patch Set: fix node.py Created 4 years 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 | « testing/buildbot/gn_isolate_map.pyl ('k') | testing/scripts/run_devtools_closure_compile.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 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 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 """Runs a python script under an isolate 6 """Runs a python script under an isolate
7 7
8 This script attempts to emulate the contract of gtest-style tests 8 This script attempts to emulate the contract of gtest-style tests
9 invoked via recipes. The main contract is that the caller passes the 9 invoked via recipes. The main contract is that the caller passes the
10 argument: 10 argument:
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 rest_args.pop(index) 43 rest_args.pop(index)
44 break 44 break
45 index += 1 45 index += 1
46 46
47 ret = common.run_command([sys.executable] + rest_args) 47 ret = common.run_command([sys.executable] + rest_args)
48 with open(args.isolated_script_test_output, 'w') as fp: 48 with open(args.isolated_script_test_output, 'w') as fp:
49 json.dump({'valid': True, 49 json.dump({'valid': True,
50 'failures': ['failed'] if ret else []}, fp) 50 'failures': ['failed'] if ret else []}, fp)
51 return ret 51 return ret
52 52
53
54 # This is not really a "script test" so does not need to manually add
55 # any additional compile targets.
53 def main_compile_targets(args): 56 def main_compile_targets(args):
54 json.dump(['devtools_closure_compile'], args.output) 57 json.dump([''], args.output)
55 58
56 59
57 if __name__ == '__main__': 60 if __name__ == '__main__':
58 # Conform minimally to the protocol defined by ScriptTest. 61 # Conform minimally to the protocol defined by ScriptTest.
59 if 'compile_targets' in sys.argv: 62 if 'compile_targets' in sys.argv:
60 funcs = { 63 funcs = {
61 'run': None, 64 'run': None,
62 'compile_targets': main_compile_targets, 65 'compile_targets': main_compile_targets,
63 } 66 }
64 sys.exit(common.run_script(sys.argv[1:], funcs)) 67 sys.exit(common.run_script(sys.argv[1:], funcs))
65 sys.exit(main()) 68 sys.exit(main())
OLDNEW
« no previous file with comments | « testing/buildbot/gn_isolate_map.pyl ('k') | testing/scripts/run_devtools_closure_compile.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698