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

Side by Side Diff: tools/gypv8sh.py

Issue 10332081: gypv8sh; only catch CalledProcessException, rather than Exception (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 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 """This script is used by chrome_tests.gypi's js2webui action to maintain the 6 """This script is used by chrome_tests.gypi's js2webui action to maintain the
7 argument lists and to generate inlinable tests. 7 argument lists and to generate inlinable tests.
8 8
9 Usage: 9 Usage:
10 python tools/gypv8sh.py v8_shell mock.js test_api.js js2webui.js \ 10 python tools/gypv8sh.py v8_shell mock.js test_api.js js2webui.js \
(...skipping 26 matching lines...) Expand all
37 inputfile, inputrelfile, cxxoutfile, jsoutfile) = args 37 inputfile, inputrelfile, cxxoutfile, jsoutfile) = args
38 arguments = [js2webui, inputfile, inputrelfile, cxxoutfile, test_type] 38 arguments = [js2webui, inputfile, inputrelfile, cxxoutfile, test_type]
39 cmd = [v8_shell, '-e', "arguments=" + json.dumps(arguments), mock_js, 39 cmd = [v8_shell, '-e', "arguments=" + json.dumps(arguments), mock_js,
40 test_api, js2webui] 40 test_api, js2webui]
41 if opts.verbose or opts.impotent: 41 if opts.verbose or opts.impotent:
42 print cmd 42 print cmd
43 if not opts.impotent: 43 if not opts.impotent:
44 try: 44 try:
45 subprocess.check_call(cmd, stdout=open(cxxoutfile, 'w')) 45 subprocess.check_call(cmd, stdout=open(cxxoutfile, 'w'))
46 shutil.copyfile(inputfile, jsoutfile) 46 shutil.copyfile(inputfile, jsoutfile)
47 except Exception, ex: 47 except subprocess.CalledProcessException, ex:
48 print "returncode", ex.returncode
48 print ex 49 print ex
49 os.remove(cxxoutfile) 50 os.remove(cxxoutfile)
50 os.remove(jsoutfile) 51 os.remove(jsoutfile)
51 sys.exit(1) 52 sys.exit(1)
52 53
53 if __name__ == '__main__': 54 if __name__ == '__main__':
54 sys.exit(main()) 55 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698