@@ -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,7 +515,7 @@ 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 || {
@@ -538,7 +538,7 @@ jobs:
538538 - name : reorganising a root that does not supply the shape renames nothing
539539 working-directory : tests/island-interface
540540 run : |
541- d=target/.build-mcpp /out/island
541+ d=$(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /island
542542 cp "$d/island_interface.kernels.cppm" /tmp/before-move.cppm
543543 mkdir -p src/cpu/deep && mv src/cpu/ops.c src/cpu/deep/ops.c
544544 rm -rf target
@@ -562,7 +562,7 @@ jobs:
562562 - name : a new island file reaches the boundary with nothing else touched
563563 working-directory : tests/island-interface
564564 run : |
565- d=target/.build-mcpp /out/island
565+ d=$(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /island
566566 rm -rf target && "$MCPP" build > base.log 2>&1
567567 before=$(grep -c '^using ::' "$d/island_interface.kernels.cppm")
568568 mkdir -p src/kernels/audio
@@ -781,16 +781,16 @@ jobs:
781781 grep -q '^all ok' run.log
782782 # The bytes are a section, so the compiler never saw a C array: the
783783 # 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
784+ test -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /spirv/scale_comp.spv
785+ test -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /spirv/spirv_object_storage.shaders.payload.S
786+ grep -q '\.incbin' $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /spirv/spirv_object_storage.shaders.payload.S
787+ if ls $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /spirv/*.inc >/dev/null 2>&1; then
788788 echo "FAIL: object storage still produced a C initialiser list"
789789 exit 1
790790 fi
791791 # `pCode` wants four-byte alignment and a section directive alone does
792792 # not promise it.
793- grep -q '\.balign 4' target/.build-mcpp /out/spirv/spirv_object_storage.shaders.payload.S
793+ grep -q '\.balign 4' $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /spirv/spirv_object_storage.shaders.payload.S
794794 echo "ok: the payload is a section, not generated source"
795795
796796 - name : rules-spirv with sidecar storage
@@ -800,7 +800,7 @@ jobs:
800800 "$MCPP" run | tee run.log
801801 grep -q '^magic=07230203' run.log
802802 grep -q '^all ok' run.log
803- test -f target/.build-mcpp /out/spirv/scale_comp.spv
803+ test -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /spirv/scale_comp.spv
804804 # THE REVERSE LEG, AND IT IS THE POINT OF THIS STORAGE. The accessor
805805 # opens a path relative to the working directory, so the program finds
806806 # its shaders from the package root and must not from anywhere else.
@@ -1001,7 +1001,7 @@ jobs:
10011001 exit 1
10021002 fi
10031003 grep -q '^export module slang_consumer.shaders;' \
1004- target/.build-mcpp /out/slang/slang_consumer.shaders.cppm
1004+ $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /slang/slang_consumer.shaders.cppm
10051005 echo "ok: a Slang shader reached through the same surface as a GLSL one"
10061006
10071007 # THE NEGATIVE LEG. A `per_file` key that names no shader must refuse the
@@ -1034,7 +1034,7 @@ jobs:
10341034 "$MCPP" run | tee run.log
10351035 grep -q '^magic=07230203' run.log
10361036 grep -q '^all ok' run.log
1037- test -f target/.build-mcpp /out/slang/scale.spv
1037+ test -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /slang/scale.spv
10381038 if grep -q 'source-embed' target/*/*/build.ninja; then
10391039 echo "FAIL: sidecar storage still asked slangc to embed"; exit 1
10401040 fi
@@ -1115,7 +1115,7 @@ jobs:
11151115 # `key_kind::relative_path` and `element::word32` -- and `head -1`
11161116 # picked one by directory order, so the check was asserting about a
11171117 # file nothing chose.
1118- mapfile -t headers < <(find target/.build-mcpp /out -name '*.h' | sort)
1118+ mapfile -t headers < <(find $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") -name '*.h' | sort)
11191119 [ "${#headers[@]}" -gt 0 ] || { echo "FAIL: no generated header"; exit 1; }
11201120 echo "checking ${#headers[@]} generated header(s)"
11211121 for h in "${headers[@]}"; do
@@ -1424,7 +1424,7 @@ jobs:
14241424 working-directory : tests/hip-consumer
14251425 run : |
14261426 "$MCPP" build
1427- test -f target/.build-mcpp /out/saxpy.hip.o
1427+ test -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /saxpy.hip.o
14281428 "$MCPP" build --no-accel
14291429 "$MCPP" run --no-accel | tee run.log
14301430 grep -q '^12 24 36 48' run.log
@@ -1437,8 +1437,8 @@ jobs:
14371437 working-directory : tests/sycl-consumer
14381438 run : |
14391439 "$MCPP" build
1440- test -f target/.build-mcpp /out/saxpy.sycl.o
1441- test -f target/.build-mcpp /out/sycl_device_link.o
1440+ test -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /saxpy.sycl.o
1441+ test -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /sycl_device_link.o
14421442 "$MCPP" build --no-accel
14431443 "$MCPP" run --no-accel | tee run.log
14441444 grep -q '^12 24 36 48' run.log
@@ -1536,9 +1536,9 @@ jobs:
15361536 working-directory : tests/multi-rule-consumer
15371537 run : |
15381538 "$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
1539+ test -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /saxpy.cu.o
1540+ test -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /spirv/scale_comp.h
1541+ test ! -f $(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /scale.cu.o
15421542 "$MCPP" run --no-accel | tee run.log
15431543 grep -q '^magic=(no shader in this build)' run.log
15441544 grep -q '^12 24 36 48' run.log
@@ -1980,7 +1980,7 @@ jobs:
19801980 "$MCPP" run | tee run.log
19811981 grep -q '^out\[0\]=6 out\[1\]=12 out\[2\]=18 out\[3\]=24' run.log
19821982 grep -q '^all ok' run.log
1983- d=target/.build-mcpp /out/island
1983+ d=$(sh "$GITHUB_WORKSPACE/tests /out-dir.sh") /island
19841984 # The namespace is the path from the layout root to the file, so this
19851985 # is the assertion a separator mistake fails.
19861986 grep -q '^export namespace island_interface::kernels {' \
0 commit comments