]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: Drop sandbox() from integration test wrapper 36009/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 15 Jan 2025 09:21:33 +0000 (10:21 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 15 Jan 2025 09:21:33 +0000 (10:21 +0100)
With the latest changes, this is not required anymore as mkosi sandbox
will set up the proper $PATH to make sure the executables from the build
directory are used.

test/integration-test-wrapper.py

index a7bf5ea6060d4b78f3049b60662ae46dc14cd6a7..cc6e9656fd856ff8d42a6330ea5a3e0dd7ec94dc 100755 (executable)
@@ -37,15 +37,6 @@ ExecStart=false
 """
 
 
-def sandbox(args: argparse.Namespace) -> list[str]:
-    return [
-        args.mkosi,
-        '--directory', os.fspath(args.meson_source_dir),
-        '--extra-search-path', os.fspath(args.meson_build_dir),
-        'sandbox',
-    ]  # fmt: skip
-
-
 @dataclasses.dataclass(frozen=True)
 class Summary:
     distribution: str
@@ -87,7 +78,7 @@ def process_coredumps(args: argparse.Namespace, journal_file: Path) -> bool:
         exclude_regex = None
 
     result = subprocess.run(
-        sandbox(args) + [
+        [
             'coredumpctl',
             '--file', journal_file,
             '--json=short',
@@ -110,7 +101,7 @@ def process_coredumps(args: argparse.Namespace, journal_file: Path) -> bool:
         return False
 
     subprocess.run(
-        sandbox(args) + [
+        [
             'coredumpctl',
             '--file', journal_file,
             '--no-pager',
@@ -152,7 +143,7 @@ def process_sanitizer_report(args: argparse.Namespace, journal_file: Path) -> bo
     find_comm = re.compile(r'^\[[.0-9 ]+?\]\s(.*?:)\s')
 
     with subprocess.Popen(
-        sandbox(args) + [
+        [
             'journalctl',
             '--output', 'short-monotonic',
             '--no-hostname',
@@ -246,7 +237,7 @@ def process_sanitizer_report(args: argparse.Namespace, journal_file: Path) -> bo
 
 def process_coverage(args: argparse.Namespace, summary: Summary, name: str, journal_file: Path) -> None:
     coverage = subprocess.run(
-        sandbox(args) + [
+        [
             'journalctl',
             '--file', journal_file,
             '--field=COVERAGE_TAR',
@@ -266,7 +257,7 @@ def process_coverage(args: argparse.Namespace, summary: Summary, name: str, jour
 
         with tempfile.TemporaryDirectory(prefix='coverage-') as tmp:
             subprocess.run(
-                sandbox(args) + [
+                [
                     'tar',
                     '--extract',
                     '--file', '-',
@@ -288,7 +279,7 @@ def process_coverage(args: argparse.Namespace, summary: Summary, name: str, jour
                 p.rename(dst)
 
             subprocess.run(
-                sandbox(args) + [
+                [
                     'find',
                     tmp,
                     '-name', '*.gcda',
@@ -300,8 +291,7 @@ def process_coverage(args: argparse.Namespace, summary: Summary, name: str, jour
             )  # fmt: skip
 
             subprocess.run(
-                sandbox(args)
-                + [
+                [
                     'rsync',
                     '--archive',
                     '--prune-empty-dirs',
@@ -315,8 +305,7 @@ def process_coverage(args: argparse.Namespace, summary: Summary, name: str, jour
             )
 
             subprocess.run(
-                sandbox(args)
-                + [
+                [
                     'lcov',
                     *(
                         [
@@ -340,8 +329,7 @@ def process_coverage(args: argparse.Namespace, summary: Summary, name: str, jour
             )  # fmt: skip
 
             subprocess.run(
-                sandbox(args)
-                + [
+                [
                     'lcov',
                     '--ignore-errors', 'inconsistent,inconsistent,format,corrupt,empty',
                     '--add-tracefile', output if output.exists() else initial,