motoko icon indicating copy to clipboard operation
motoko copied to clipboard

test: add `only.mk` and `accept.mk`

Open rvanasa opened this issue 6 months ago • 3 comments

This PR adds *.mk files written by @ggreif which simplify running and accepting changes for individual tests.

make -C test/run example.only # Run `example.mo`
make -C test/run example.accept # Run and accept output for `example.mo`

rvanasa avatar Jun 11 '25 15:06 rvanasa

Both are a bit incomplete. They cannot process %.drun input, so ../run.sh is still manual. But for the common case these turned out to be very handy on my side. accept.mk doesn't discover new %.ok files, but that could be added easily. For now git add is your friend.

ggreif avatar Jun 11 '25 15:06 ggreif

Wouldn't it be easier to directly use test/run.sh in those cases?

test/run.sh test/run/example.mo # Run `example.mo`
test/run.sh test/run/example.mo -a # Run and accept output for `example.mo`

christoph-dfinity avatar Jun 11 '25 15:06 christoph-dfinity

Comparing from f622ca46ff8e7f8e3bb8f241bf1289d4359e94e9 to 8857bd0ab01e4bd245cecdecec4c41b7e6bc5a35: The produced WebAssembly code seems to be completely unchanged.

github-actions[bot] avatar Jun 11 '25 15:06 github-actions[bot]