toolchain-utils: strip argv[0] before calling setup_chromeos.Main()
This is a followup to https://chrome-internal-review.googlesource.com/#/c/245868
test_toolchains.py directly calls setup_chromeos.Main(). setup_chromeos.py was
changed recently to use argparse instead of optparse. Remove the name of the
script from the arguments to Main() to keep argparse happy.
BUG=None
TEST='nightly_wrapper.sh lumpy ...' proceeds with no error during argument parsing.
Change-Id: I30e8e6f1372676126b0af08125467096ea866266
Reviewed-on: https://chrome-internal-review.googlesource.com/246266
Commit-Ready: Rahul Chaudhry <rahulchaudhry@google.com>
Tested-by: Rahul Chaudhry <rahulchaudhry@google.com>
Reviewed-by: Caroline Tice <cmtice@google.com>
diff --git a/test_toolchains.py b/test_toolchains.py
index 6a793de..4c03d45 100755
--- a/test_toolchains.py
+++ b/test_toolchains.py
@@ -135,8 +135,7 @@
def _CheckoutChromeOS(self):
# TODO(asharif): Setup a fixed ChromeOS version (quarterly snapshot).
if not os.path.exists(self._chromeos_root):
- setup_chromeos_args = [setup_chromeos.__file__,
- '--dir=%s' % self._chromeos_root]
+ setup_chromeos_args = ['--dir=%s' % self._chromeos_root]
if self._public:
setup_chromeos_args.append('--public')
ret = setup_chromeos.Main(setup_chromeos_args)