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

Unified Diff: tools/gypv8sh.py

Issue 304793002: Support automatically resolving dependencies in javascript tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Various fixes. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: tools/gypv8sh.py
diff --git a/tools/gypv8sh.py b/tools/gypv8sh.py
index 5c93e51bf717d579f8390a690c4d7b6fde10f296..b8bd4066ec28ae2a5b5b9a33e5a2e36e0ceff14b 100755
--- a/tools/gypv8sh.py
+++ b/tools/gypv8sh.py
@@ -5,10 +5,6 @@
"""This script is used by chrome_tests.gypi's js2webui action to maintain the
argument lists and to generate inlinable tests.
-
-Usage:
- python tools/gypv8sh.py v8_shell mock.js test_api.js js2webui.js \
- inputfile inputrelfile cxxoutfile jsoutfile
"""
import json
@@ -22,24 +18,28 @@ import shutil
def main ():
parser = optparse.OptionParser()
parser.set_usage(
- "%prog v8_shell mock.js axs_testing.js test_api.js js2webui.js "
+ "%prog v8_shell mock.js test_api.js js2webui.js "
"testtype inputfile inputrelfile cxxoutfile jsoutfile")
parser.add_option('-v', '--verbose', action='store_true')
parser.add_option('-n', '--impotent', action='store_true',
help="don't execute; just print (as if verbose)")
+ parser.add_option('--deps_js', action="store",
+ help=("Path to deps.js for dependency resolution, " +
+ "optional."))
(opts, args) = parser.parse_args()
- if len(args) != 10:
+ if len(args) != 9:
parser.error('all arguments are required.')
- (v8_shell, mock_js, axs_testing_js, test_api, js2webui, test_type,
+ (v8_shell, mock_js, test_api, js2webui, test_type,
inputfile, inputrelfile, cxxoutfile, jsoutfile) = args
cmd = [v8_shell]
icudatafile = os.path.join(os.path.dirname(v8_shell), 'icudtl.dat')
if os.path.exists(icudatafile):
cmd.extend(['--icu-data-file=%s' % icudatafile])
- arguments = [js2webui, inputfile, inputrelfile, cxxoutfile, test_type]
+ arguments = [js2webui, inputfile, inputrelfile, opts.deps_js,
+ cxxoutfile, test_type]
cmd.extend(['-e', "arguments=" + json.dumps(arguments), mock_js,
- axs_testing_js, test_api, js2webui])
+ test_api, js2webui])
if opts.verbose or opts.impotent:
print cmd
if not opts.impotent:

Powered by Google App Engine
This is Rietveld 408576698