diff options
| author | Damian Tarnawski <gthetarnav@gmail.com> | 2025-09-11 00:37:38 +0200 |
|---|---|---|
| committer | Damian Tarnawski <gthetarnav@gmail.com> | 2025-09-11 00:37:38 +0200 |
| commit | ac970c5ea6cb7dfff3be9f585787339691b6b9df (patch) | |
| tree | 83bbdb5a32dee43acdcd3714a3a315c1b02643e2 /build.sh | |
| parent | c38a228ad96efd1b2cf9f5f1c6a3b9489fd34b70 (diff) | |
Correct single_test and add build_test build script commands
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -10,7 +10,7 @@ then #BUG in odin test, it makes the executable with the same name as a folder and gets confused. cd tests - odin test ../tests -collection:src=../src -test-name:$@ -define:ODIN_TEST_THREADS=1 -define:ODIN_TEST_TRACK_MEMORY=false + odin test ../tests -collection:src=../src -define:ODIN_TEST_NAMES=$@ -define:ODIN_TEST_THREADS=1 -define:ODIN_TEST_TRACK_MEMORY=false shift @@ -40,6 +40,25 @@ then exit 0 fi + +if [[ $1 == "build_test" ]] +then + shift + + #BUG in odin test, it makes the executable with the same name as a folder and gets confused. + cd tests + + odin build ../tests -build-mode:test -collection:src=../src $@ -define:ODIN_TEST_THREADS=1 -define:ODIN_TEST_TRACK_MEMORY=false + + if ([ $? -ne 0 ]) + then + echo "Build failed" + exit 1 + fi + + exit 0 +fi + if [[ $1 == "debug" ]] then shift |