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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py

Issue 1998413002: Simplify import-w3c-tests: support exactly one argument. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update usage string Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
index eec089e72d90cc525ebc1a2fca1d452dd76657ee..4c54e612f8943edebd12e587965c71cec5f45dbd 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
@@ -129,7 +129,7 @@ def configure_logging():
def parse_args():
- parser = optparse.OptionParser(usage='usage: %prog [options] [dir_to_import] [top_of_repo]')
+ parser = optparse.OptionParser(usage='usage: %prog [options] [dir_to_import] top_of_repo')
parser.add_option('-n', '--no-overwrite', dest='overwrite', action='store_false', default=True,
help='Flag to prevent duplicate test files from overwriting existing tests. By default, they will be overwritten.')
parser.add_option('-a', '--all', action='store_true', default=False,
@@ -142,13 +142,8 @@ def parse_args():
help='Dryrun only (don\'t actually write any results).')
options, args = parser.parse_args()
- if len(args) > 2:
+ if len(args) > 2 or len(args) == 0:
Dirk Pranke 2016/05/23 20:28:24 In what situation these days do we actually specif
parser.error('Incorrect number of arguments')
- elif len(args) == 0:
- # If no top-of-repo path was given, then assume that the user means to
- # use the current working directory as the top-of-repo path.
- # TODO(qyearsley): Remove this behavior, since it's a little confusing.
- args = (os.getcwd(),)
return options, args
« 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