From e967d0aea2500425b46f8d39aea1be0ef14e3e75 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Wed, 2 Apr 2025 10:37:00 -0400 Subject: [PATCH] Use nul bytes as delimiters --- .github/scripts/find_kernels.py | 7 +++++-- .github/workflows/ci.yml | 6 ++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/scripts/find_kernels.py b/.github/scripts/find_kernels.py index 08d1080c..c077e767 100755 --- a/.github/scripts/find_kernels.py +++ b/.github/scripts/find_kernels.py @@ -23,8 +23,11 @@ def main() -> None: module_dir = find_modules_directory('test/.tmp', image_name) modules.append(module_dir) - args = ' '.join(f"{image}:{module}" for image, module in zip(images, modules)) - print(args) + for image, module in zip(images, modules): + sys.stdout.write(image) + sys.stdout.write(':') + sys.stdout.write(module) + sys.stdout.write('\0') if __name__ == "__main__": main() diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33eb0098..723876d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -332,10 +332,9 @@ jobs: if: runner.os == 'Linux' run: | set -euxo pipefail - ARGS=$(./.github/scripts/find_kernels.py) + .github/scripts/find_kernels.py | xargs -t -0 \ cargo xtask integration-test vm --cache-dir test/.tmp \ --github-api-token ${{ secrets.GITHUB_TOKEN }} \ - ${ARGS} - name: Run virtualized integration tests if: runner.os == 'macOS' @@ -344,10 +343,9 @@ jobs: CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER: x86_64-linux-musl-gcc run: | set -euxo pipefail - ARGS=$(./.github/scripts/find_kernels.py) + .github/scripts/find_kernels.py | xargs -t -0 \ cargo xtask integration-test vm --cache-dir test/.tmp \ --github-api-token ${{ secrets.GITHUB_TOKEN }} \ - ${ARGS} # Provides a single status check for the entire build workflow. # This is used for merge automation, like Mergify, since GH actions