Skip to content

Commit b3ad220

Browse files
committed
fix(smoke): openblas Windows direct-launch uses absolute exe path
The Phase D direct-launch assertion ran the .exe found by `find target` (a path relative to the project dir) after `cd /`, so it resolved to a nonexistent path ("No such file or directory") and failed even though the build linked the import lib, deployed bin/libopenblas.dll beside the .exe (the DLL-presence check passed), and `mcpp run` succeeded. Absolutise the exe path (exedir via pwd + basename) before the neutral-CWD launch.
1 parent 7532b36 commit b3ad220

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎tests/smoke_compat_portable.sh‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,11 +455,15 @@ EOF
455455
"$MCPP_BIN_POSIX" run
456456
exe="$(find target -type f -name '*.exe' | head -1)"
457457
[ -n "$exe" ] || { echo "FAIL: openblas smoke produced no .exe"; exit 1; }
458+
# Absolutise: `find` yields a path relative to the project dir, but the launch
459+
# runs from a neutral CWD (so the DLL can only be found beside the .exe, not
460+
# via CWD). pwd makes exedir absolute; build an absolute native exe path.
458461
exedir="$(cd "$(dirname "$exe")" && pwd)"
462+
exeabs="$exedir/$(basename "$exe")"
459463
[ -f "$exedir/libopenblas.dll" ] || {
460464
echo "FAIL: libopenblas.dll was not deployed beside the .exe ($exedir)"
461465
ls -la "$exedir"; exit 1; }
462-
( cd / && "$(to_native_path "$exe")" ) || {
466+
( cd / && "$(to_native_path "$exeabs")" ) || {
463467
echo "FAIL: direct .exe launch failed — deployed DLL not loadable"; exit 1; }
464468
fi
465469

0 commit comments

Comments
 (0)