From 82d6bcbdea7125d4e8d6acaa60e9847a7ce1464d Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 15 Jan 2025 10:21:12 +0100 Subject: [PATCH 1/2] mkosi: Update to latest --- .github/workflows/coverage.yml | 2 +- .github/workflows/mkosi.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index ad7222e174..b8f54094ed 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -25,7 +25,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: systemd/mkosi@7051715d8541d4d077a218f7445976225ec74d78 + - uses: systemd/mkosi@c1ae257e270e768088eadf7b44fbbbb48c575709 # Freeing up disk space with rm -rf can take multiple minutes. Since we don't need the extra free space # immediately, we remove the files in the background. However, we first move them to a different location diff --git a/.github/workflows/mkosi.yml b/.github/workflows/mkosi.yml index 592ed41051..4c176e971f 100644 --- a/.github/workflows/mkosi.yml +++ b/.github/workflows/mkosi.yml @@ -120,7 +120,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: systemd/mkosi@7051715d8541d4d077a218f7445976225ec74d78 + - uses: systemd/mkosi@c1ae257e270e768088eadf7b44fbbbb48c575709 # Freeing up disk space with rm -rf can take multiple minutes. Since we don't need the extra free space # immediately, we remove the files in the background. However, we first move them to a different location From ac75c5192797082c1965ab30be4711490f2937bc Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 15 Jan 2025 10:21:33 +0100 Subject: [PATCH 2/2] test: Drop sandbox() from integration test wrapper 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 | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/test/integration-test-wrapper.py b/test/integration-test-wrapper.py index a7bf5ea606..cc6e9656fd 100755 --- a/test/integration-test-wrapper.py +++ b/test/integration-test-wrapper.py @@ -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,