Iterate on one smoke test
Do not run make smoke while iterating on one test. The cp / pylon-launch -c 'import _<name>' / rm cycle is the standalone loop
and takes seconds instead of minutes:
cp tests/blake3_smoke.py deps/cpython-3.14/Lib/_blake3_smoke.py
PYLON_CPYTHON_DIR=$PWD/deps/cpython-3.14 \
packaging/launcher-rs/target/release/pylon-launch \
plans/python-pylon-dynlink.json \
-c 'import _blake3_smoke'
rm deps/cpython-3.14/Lib/_blake3_smoke.py
Why this shape
pylon-launchneeds a module import, not a script path (its stdin isn't wired to a filesystem-backed script).-c 'import _foo'works because CPython's stdlib import machinery looks inLib/.- The staged filename must start with
_(or otherwise not collide with real stdlib names). By convention, prefix_smoke_or use the pattern above. PYLON_CPYTHON_DIRtells the launcher where the mountedLib/lives.- Always clean up. Leaving
_blake3_smoke.pyinLib/after a crash means the nextmake smokewill try to run it before staging its own copy.
The same trick is how scripts/run-smoke-tests.sh invokes every
tests/*_smoke.py. Read it once; the shape will be permanently
memorable.
Ad-hoc probe
If you don't want to add a real smoke, make probe FILE=<path> will
stage, run, and tear down a single .py file for you:
make probe FILE=/tmp/scratch.py