@@ -253,9 +253,9 @@ jobs:
253253 # from one that does not; without the guard this is
254254 # `namespace default {` and the generated file does not parse.
255255 grep -q '^namespace default_ {' \
256- target/.build-mcpp /out/spirv/shader_app.shaders.cppm \
256+ $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /spirv/shader_app.shaders.cppm \
257257 || { echo "FAIL: the keyword directory did not get its trailing underscore"
258- grep -n namespace target/.build-mcpp /out/spirv/shader_app.shaders.cppm
258+ grep -n namespace $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /spirv/shader_app.shaders.cppm
259259 exit 1; }
260260 # The point of the surface: a consumer names no generated file.
261261 if grep -rn 'scale_comp\.h\|\.inc"' src/; then
@@ -271,10 +271,10 @@ jobs:
271271 # manifest directory's leaf -- which is what this rule did before mcpp
272272 # 2026.9.7.1 gave build programs `mcpp::package_name()` -- would write
273273 # `spirv_module_consumer.shaders.cppm` and this test would find no file.
274- iface=target/.build-mcpp /out/spirv/shader_app.shaders.cppm
274+ iface=$(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /spirv/shader_app.shaders.cppm
275275 test -f "$iface" || {
276276 echo "FAIL: no module interface at $iface"
277- find target/.build-mcpp /out/spirv -name '*.cppm' -print
277+ find $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /spirv -name '*.cppm' -print
278278 exit 1; }
279279 grep -q '^export module shader_app.shaders;' "$iface"
280280 # The interface must name no standard-library type: one that does
@@ -300,7 +300,7 @@ jobs:
300300 tar -xzf shaderc.tar.gz
301301 rm -rf target
302302 MCPP_GLSLC="$PWD/shaderc-2026.3/bin/glslc" "$MCPP" build
303- test -f target/.build-mcpp /out/spirv/scale_comp.inc
303+ test -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /spirv/scale_comp.inc
304304 MCPP_GLSLC="$PWD/shaderc-2026.3/bin/glslc" "$MCPP" run | tee run-glslc.log
305305 grep -q '^magic=07230203' run-glslc.log
306306 rm -rf shaderc.tar.gz shaderc-2026.3
@@ -339,7 +339,7 @@ jobs:
339339 # TWO declarations, and the directory is in the second one's name.
340340 # A build that collapsed them would also produce a working binary, so
341341 # the criterion is the generated names rather than the run.
342- d=target/.build-mcpp /out/spirv
342+ d=$(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /spirv
343343 find "$d" -name '*.h' | sort | sed 's/^/ /'
344344 grep -rq 'scale_comp_spv' "$d" || {
345345 echo "FAIL: the top-level shader lost its declaration"; exit 1; }
@@ -385,7 +385,7 @@ jobs:
385385 grep -q '^all ok' run.log
386386 # Neither artefact is written by hand.
387387 test ! -f include/island_interface.kernels.h
388- d=target/.build-mcpp /out/island
388+ d=$(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /island
389389 grep -q 'extern "C" {' "$d/island_interface.kernels.h"
390390 # THE MODULE NAME AND THE NAMESPACE ARE ONE IDENTIFIER PATH, which is
391391 # the rule docs/42 states for both lanes and the one this generator
@@ -515,14 +515,16 @@ jobs:
515515 - name : the same boundary and the same names, from the half the build selected
516516 working-directory : tests/island-interface
517517 run : |
518- d=target/.build-mcpp /out/island
518+ d=$(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /island
519519 cp "$d/island_interface.kernels.cppm" /tmp/device-leg.cppm
520520 rm -rf target
521521 "$MCPP" build --no-accel > cpu.log 2>&1 || {
522522 echo "FAIL: the CPU leg does not build"; tail -25 cpu.log; exit 1; }
523523 "$MCPP" run --no-accel | tee cpurun.log
524524 grep -q '^out\[0\]=6 out\[1\]=12 out\[2\]=18 out\[3\]=24' cpurun.log
525525 grep -q '^all ok' cpurun.log
526+ # The CPU leg is another configuration, with its own output directory.
527+ d=$(sh "$GITHUB_WORKSPACE/tests/out-dir.sh")/island
526528 diff /tmp/device-leg.cppm "$d/island_interface.kernels.cppm" || {
527529 echo "FAIL: the qualified names differ between the two legs"; exit 1; }
528530 echo "ok: the CPU leg reaches the same qualified names"
@@ -538,7 +540,7 @@ jobs:
538540 - name : reorganising a root that does not supply the shape renames nothing
539541 working-directory : tests/island-interface
540542 run : |
541- d=target/.build-mcpp /out/island
543+ d=$(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /island
542544 cp "$d/island_interface.kernels.cppm" /tmp/before-move.cppm
543545 mkdir -p src/cpu/deep && mv src/cpu/ops.c src/cpu/deep/ops.c
544546 rm -rf target
@@ -562,8 +564,8 @@ jobs:
562564 - name : a new island file reaches the boundary with nothing else touched
563565 working-directory : tests/island-interface
564566 run : |
565- d=target/.build-mcpp/out/island
566567 rm -rf target && "$MCPP" build > base.log 2>&1
568+ d=$(sh "$GITHUB_WORKSPACE/tests/out-dir.sh")/island
567569 before=$(grep -c '^using ::' "$d/island_interface.kernels.cppm")
568570 mkdir -p src/kernels/audio
569571 printf 'MCPP_EXPORT_C\nint island_fft(float* out, unsigned n) { (void)out; (void)n; return 0; }\n' \
@@ -781,16 +783,16 @@ jobs:
781783 grep -q '^all ok' run.log
782784 # The bytes are a section, so the compiler never saw a C array: the
783785 # payload is a bare `.spv` and an `.S` names it with `.incbin`.
784- test -f target/.build-mcpp /out/spirv/scale_comp.spv
785- test -f target/.build-mcpp /out/spirv/spirv_object_storage.shaders.payload.S
786- grep -q '\.incbin' target/.build-mcpp /out/spirv/spirv_object_storage.shaders.payload.S
787- if ls target/.build-mcpp /out/spirv/*.inc >/dev/null 2>&1; then
786+ test -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /spirv/scale_comp.spv
787+ test -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /spirv/spirv_object_storage.shaders.payload.S
788+ grep -q '\.incbin' $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /spirv/spirv_object_storage.shaders.payload.S
789+ if ls $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /spirv/*.inc >/dev/null 2>&1; then
788790 echo "FAIL: object storage still produced a C initialiser list"
789791 exit 1
790792 fi
791793 # `pCode` wants four-byte alignment and a section directive alone does
792794 # not promise it.
793- grep -q '\.balign 4' target/.build-mcpp /out/spirv/spirv_object_storage.shaders.payload.S
795+ grep -q '\.balign 4' $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /spirv/spirv_object_storage.shaders.payload.S
794796 echo "ok: the payload is a section, not generated source"
795797
796798 - name : rules-spirv with sidecar storage
@@ -800,7 +802,7 @@ jobs:
800802 "$MCPP" run | tee run.log
801803 grep -q '^magic=07230203' run.log
802804 grep -q '^all ok' run.log
803- test -f target/.build-mcpp /out/spirv/scale_comp.spv
805+ test -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /spirv/scale_comp.spv
804806 # THE REVERSE LEG, AND IT IS THE POINT OF THIS STORAGE. The accessor
805807 # opens a path relative to the working directory, so the program finds
806808 # its shaders from the package root and must not from anywhere else.
@@ -1001,7 +1003,7 @@ jobs:
10011003 exit 1
10021004 fi
10031005 grep -q '^export module slang_consumer.shaders;' \
1004- target/.build-mcpp /out/slang/slang_consumer.shaders.cppm
1006+ $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /slang/slang_consumer.shaders.cppm
10051007 echo "ok: a Slang shader reached through the same surface as a GLSL one"
10061008
10071009 # THE NEGATIVE LEG. A `per_file` key that names no shader must refuse the
@@ -1034,7 +1036,7 @@ jobs:
10341036 "$MCPP" run | tee run.log
10351037 grep -q '^magic=07230203' run.log
10361038 grep -q '^all ok' run.log
1037- test -f target/.build-mcpp /out/slang/scale.spv
1039+ test -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /slang/scale.spv
10381040 if grep -q 'source-embed' target/*/*/build.ninja; then
10391041 echo "FAIL: sidecar storage still asked slangc to embed"; exit 1
10401042 fi
@@ -1115,7 +1117,7 @@ jobs:
11151117 # `key_kind::relative_path` and `element::word32` -- and `head -1`
11161118 # picked one by directory order, so the check was asserting about a
11171119 # file nothing chose.
1118- mapfile -t headers < <(find target/.build-mcpp /out -name '*.h' | sort)
1120+ mapfile -t headers < <(find $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") -name '*.h' | sort)
11191121 [ "${#headers[@]}" -gt 0 ] || { echo "FAIL: no generated header"; exit 1; }
11201122 echo "checking ${#headers[@]} generated header(s)"
11211123 for h in "${headers[@]}"; do
@@ -1424,7 +1426,7 @@ jobs:
14241426 working-directory : tests/hip-consumer
14251427 run : |
14261428 "$MCPP" build
1427- test -f target/.build-mcpp /out/saxpy.hip.o
1429+ test -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /saxpy.hip.o
14281430 "$MCPP" build --no-accel
14291431 "$MCPP" run --no-accel | tee run.log
14301432 grep -q '^12 24 36 48' run.log
@@ -1437,8 +1439,8 @@ jobs:
14371439 working-directory : tests/sycl-consumer
14381440 run : |
14391441 "$MCPP" build
1440- test -f target/.build-mcpp /out/saxpy.sycl.o
1441- test -f target/.build-mcpp /out/sycl_device_link.o
1442+ test -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /saxpy.sycl.o
1443+ test -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /sycl_device_link.o
14421444 "$MCPP" build --no-accel
14431445 "$MCPP" run --no-accel | tee run.log
14441446 grep -q '^12 24 36 48' run.log
@@ -1536,9 +1538,9 @@ jobs:
15361538 working-directory : tests/multi-rule-consumer
15371539 run : |
15381540 "$MCPP" build
1539- test -f target/.build-mcpp /out/saxpy.cu.o
1540- test -f target/.build-mcpp /out/spirv/scale_comp.h
1541- test ! -f target/.build-mcpp /out/scale.cu.o
1541+ test -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /saxpy.cu.o
1542+ test -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /spirv/scale_comp.h
1543+ test ! -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /scale.cu.o
15421544 "$MCPP" run --no-accel | tee run.log
15431545 grep -q '^magic=(no shader in this build)' run.log
15441546 grep -q '^12 24 36 48' run.log
@@ -1980,7 +1982,7 @@ jobs:
19801982 "$MCPP" run | tee run.log
19811983 grep -q '^out\[0\]=6 out\[1\]=12 out\[2\]=18 out\[3\]=24' run.log
19821984 grep -q '^all ok' run.log
1983- d=target/.build-mcpp /out/island
1985+ d=$(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /island
19841986 # The namespace is the path from the layout root to the file, so this
19851987 # is the assertion a separator mistake fails.
19861988 grep -q '^export namespace island_interface::kernels {' \
0 commit comments