Repository: kudu
Updated Branches:
  refs/heads/master 1eb15683b -> cf67b59ec


dist_test: fix the ability to pass flags to the 'run' option

The python 'argparse' module ends up considering the special '--' flag
an actual flag in the "remainder". So, for a typical command line like:

  dist_test.py run -- --stress_cpu_threads 3

... it was ending up passing too many '--' through to the underlying
binary, which caused the arguments after it to be ignored.

This simply removes the extra '--' when it is detected.

Change-Id: Id191a6f35520678ce48e78be0507d9f4607a2ea8
Reviewed-on: http://gerrit.cloudera.org:8080/9502
Reviewed-by: Adar Dembo <a...@cloudera.com>
Tested-by: Kudu Jenkins


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/cf67b59e
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/cf67b59e
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/cf67b59e

Branch: refs/heads/master
Commit: cf67b59ec6fdfa02d4fc00e55ca00b5dfa83cce1
Parents: 1eb1568
Author: Todd Lipcon <t...@apache.org>
Authored: Mon Mar 5 16:41:56 2018 -0800
Committer: Todd Lipcon <t...@apache.org>
Committed: Tue Mar 6 18:26:10 2018 +0000

----------------------------------------------------------------------
 build-support/dist_test.py | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/cf67b59e/build-support/dist_test.py
----------------------------------------------------------------------
diff --git a/build-support/dist_test.py b/build-support/dist_test.py
index 0e9ab66..132b465 100755
--- a/build-support/dist_test.py
+++ b/build-support/dist_test.py
@@ -446,6 +446,8 @@ def run_tests(parser, options):
   """
   executions = get_test_executions(options)
   if options.extra_args:
+    if options.extra_args[0] == '--':
+      del options.extra_args[0]
     for e in executions:
       e.argv.extend(options.extra_args)
   staging = StagingDir.new()

Reply via email to