浏览代码

Use nul bytes as delimiters

Tamir Duberstein 2 月之前
父节点
当前提交
e967d0aea2
共有 2 个文件被更改,包括 7 次插入6 次删除
  1. 5 2
      .github/scripts/find_kernels.py
  2. 2 4
      .github/workflows/ci.yml

+ 5 - 2
.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()

+ 2 - 4
.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