diff options
-rwxr-xr-x | kleaf/bazel.py | 3 | ||||
-rw-r--r-- | kleaf/tests/integration_test/integration_test.py | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/kleaf/bazel.py b/kleaf/bazel.py index 9a876276..ff8c973c 100755 --- a/kleaf/bazel.py +++ b/kleaf/bazel.py @@ -15,6 +15,7 @@ import argparse import os import pathlib +import re import shlex import shutil import sys @@ -546,7 +547,6 @@ class BazelWrapper(KleafHelpPrinter): if run_as_subprocess: import asyncio - import re asyncio.run(run(final_args, self.env, filter_regex, epilog_coro)) else: os.execve(path=self.bazel_path, argv=final_args, env=self.env) @@ -561,7 +561,6 @@ async def output_filter(input_stream, output_stream, filter_regex): If filter_regex is None, don't filter lines. """ - import re while not input_stream.at_eof(): output = await input_stream.readline() if filter_regex: diff --git a/kleaf/tests/integration_test/integration_test.py b/kleaf/tests/integration_test/integration_test.py index f874d552..021a8040 100644 --- a/kleaf/tests/integration_test/integration_test.py +++ b/kleaf/tests/integration_test/integration_test.py @@ -617,6 +617,11 @@ class QuickIntegrationTest(KleafIntegrationTestBase): """Test that `bazel help kleaf` works.""" self._check_output("help", ["kleaf"]) + def test_strip_execroot(self): + """Test that --strip_execroot works.""" + self._check_output("build", ["--nobuild", "--strip_execroot", + "//build/kernel:hermetic-tools"]) + class ScmversionIntegrationTest(KleafIntegrationTestBase): |