Open IanLilleyT opened 2 years ago
I'd prefer odin test <package> -build-only
to splitting it up into two verbs, odin test-build
& odin test-run
. Too much noise for a rare use case.
And while we're at it, we could add a odin test <package> -keep-test-executable
to keep the executable after running the test, with it being deleted by default.
Summary
When debugging tests I have to point the debugger at
{root}/source/.exe
(the default test executable location)instead of a more sane custom path like
{root}/test.exe
Allowing
-out
withodin test
would make this possible, but I'm not sure if it's in the spirit ofodin test
, seeing that it was disallowed in the original commit (https://github.com/odin-lang/Odin/commit/2bd0fd932a4eb1c2e6bc8702450c230186bb3c44). The fix is to remove&~ Command_test
from here: https://github.com/odin-lang/Odin/blob/81e3b64ecda857458b8e0762bdf6156cdaa1cb74/src/main.cpp#L750Side note, one awkward thing about debugging tests is they get run twice: first when calling
odin test
, which builds and runs the test executable, and again when debugging. To get around this there would need to be aodin test-build
andodin test-run
similar toodin build
andodin run
. Right now it's not a big deal and there's benefits to having a cleaner CLI with justodin test
. Anyway, that's a separate matter.Report