aboutsummaryrefslogtreecommitdiff
path: root/test_toolchains.py
diff options
context:
space:
mode:
authorRahul Chaudhry <rahulchaudhry@chromium.org>2016-01-25 16:49:21 -0800
committerchrome-bot <chrome-bot@chromium.org>2016-01-26 11:19:17 +0000
commit748254e9a5dd7227806ca618d1f9a32ab49f4056 (patch)
tree0d4323abe9aa7b48cb4b499ba8b0da0df0d67bc8 /test_toolchains.py
parent49f3f09f8b5f243949968d88ce7fd9efe1393ad9 (diff)
downloadtoolchain-utils-748254e9a5dd7227806ca618d1f9a32ab49f4056.tar.gz
toolchain-utils: strip argv[0] before calling Main().
https://chrome-internal-review.googlesource.com/#/c/244221 fixed some cros lint errors, and in the process, modified test_toolchains.py to use argparse instead of optparse. The flags parsing semantics of these modules seem to differ when they see an argument which is not a flag. As a result, "nightly_wrapper.sh" nightly cron jobs are failing with error: "unrecognized arguments: /usr/local/google/crostc/toolchain-utils/test_toolchains.py" This CL strips the argv[0] before calling Main(), since the name of the script is not really an argument and doesn't need to be parsed. BUG=None TEST='nightly_wrapper.sh lumpy ...' proceeds with no error during argument parsing. Change-Id: Idf13ab457170bb051d4d0693a887795d0c16918d Reviewed-on: https://chrome-internal-review.googlesource.com/245868 Commit-Ready: Luis Lozano <llozano@chromium.org> Tested-by: Luis Lozano <llozano@chromium.org> Reviewed-by: Luis Lozano <llozano@chromium.org>
Diffstat (limited to 'test_toolchains.py')
-rwxr-xr-xtest_toolchains.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test_toolchains.py b/test_toolchains.py
index 65c359a6..6a793ded 100755
--- a/test_toolchains.py
+++ b/test_toolchains.py
@@ -396,5 +396,5 @@ def Main(argv):
if __name__ == '__main__':
- retval = Main(sys.argv)
+ retval = Main(sys.argv[1:])
sys.exit(retval)