summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kleaf/tests/integration_test/integration_test.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/kleaf/tests/integration_test/integration_test.py b/kleaf/tests/integration_test/integration_test.py
index b221fb0..a3fbd21 100644
--- a/kleaf/tests/integration_test/integration_test.py
+++ b/kleaf/tests/integration_test/integration_test.py
@@ -166,9 +166,19 @@ class KleafIntegrationTestBase(unittest.TestCase):
if use_bazelrc:
subprocess_args.append(f"--bazelrc={self._bazel_rc.name}")
subprocess_args.append(command)
- subprocess_args.extend(command_args)
+
+ if "--" in command_args:
+ idx = command_args.index("--")
+ bazel_command_args = command_args[:idx]
+ script_args = command_args[idx:]
+ else:
+ bazel_command_args = command_args
+ script_args = []
+
+ subprocess_args.extend(bazel_command_args)
if use_wrapper_args:
subprocess_args.extend(arguments.bazel_wrapper_args)
+ subprocess_args.extend(script_args)
# kwargs has known arguments filtered out.
return subprocess_args, kwargs