aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorDamian Tarnawski <gthetarnav@gmail.com>2025-09-11 00:37:38 +0200
committerDamian Tarnawski <gthetarnav@gmail.com>2025-09-11 00:37:38 +0200
commitac970c5ea6cb7dfff3be9f585787339691b6b9df (patch)
tree83bbdb5a32dee43acdcd3714a3a315c1b02643e2 /build.sh
parentc38a228ad96efd1b2cf9f5f1c6a3b9489fd34b70 (diff)
Correct single_test and add build_test build script commands
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh21
1 files changed, 20 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index 6168842..c0a652a 100755
--- a/build.sh
+++ b/build.sh
@@ -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