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

Side by Side Diff: tools/gypv8sh.py

Issue 292313004: Port aria_util_test.js to run as a WebUI test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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 | « chrome/test/base/web_ui_browsertest.cc ('k') | 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) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 axs_testing_js, test_api, js2webui]) 42 axs_testing_js, test_api, js2webui])
43 if opts.verbose or opts.impotent: 43 if opts.verbose or opts.impotent:
44 print cmd 44 print cmd
45 if not opts.impotent: 45 if not opts.impotent:
46 try: 46 try:
47 with open(cxxoutfile, 'w') as f: 47 with open(cxxoutfile, 'w') as f:
48 subprocess.check_call(cmd, stdin=subprocess.PIPE, stdout=f) 48 subprocess.check_call(cmd, stdin=subprocess.PIPE, stdout=f)
49 shutil.copyfile(inputfile, jsoutfile) 49 shutil.copyfile(inputfile, jsoutfile)
50 except Exception, ex: 50 except Exception, ex:
51 if os.path.exists(cxxoutfile): 51 if os.path.exists(cxxoutfile):
52 # The contents of the output file will include the error message.
53 print open(cxxoutfile).read()
52 os.remove(cxxoutfile) 54 os.remove(cxxoutfile)
53 if os.path.exists(jsoutfile): 55 if os.path.exists(jsoutfile):
54 os.remove(jsoutfile) 56 os.remove(jsoutfile)
55 raise 57 raise
56 58
57 59
58 if __name__ == '__main__': 60 if __name__ == '__main__':
59 sys.exit(main()) 61 sys.exit(main())
OLDNEW
« no previous file with comments | « chrome/test/base/web_ui_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698