diff options
| author | Daniel Gavin <danielgavin5@hotmail.com> | 2022-07-27 16:47:49 +0200 |
|---|---|---|
| committer | Daniel Gavin <danielgavin5@hotmail.com> | 2022-07-27 16:47:49 +0200 |
| commit | 56c8aa0362f8e6f2b8b1c019f4d09fc1230b5eaa (patch) | |
| tree | de1f60f659af13317019cb4aab1e5526579b527b /tools | |
| parent | 1895b3b04fb0a88a2a8b1778908140555a372074 (diff) | |
CI added for odinfmt
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/odinfmt/tests.bat | 6 | ||||
| -rw-r--r-- | tools/odinfmt/tests.odin | 6 | ||||
| -rwxr-xr-x | tools/odinfmt/tests.sh | 10 |
3 files changed, 19 insertions, 3 deletions
diff --git a/tools/odinfmt/tests.bat b/tools/odinfmt/tests.bat index 13172ef..1c97c17 100644 --- a/tools/odinfmt/tests.bat +++ b/tools/odinfmt/tests.bat @@ -1,2 +1,4 @@ -odin run tests.odin -file -show-timings -collection:shared=../../src -out:tests.exe - +echo off +cd /D "%~dp0" +odin run tests.odin -file -collection:shared=../../src -out:tests.exe +if %errorlevel% neq 0 exit 1
\ No newline at end of file diff --git a/tools/odinfmt/tests.odin b/tools/odinfmt/tests.odin index 336f7d2..8bd0399 100644 --- a/tools/odinfmt/tests.odin +++ b/tools/odinfmt/tests.odin @@ -10,5 +10,9 @@ import "snapshot" main :: proc() { init_global_temporary_allocator(mem.Megabyte*100) - snapshot.snapshot_directory("tests") + + if !snapshot.snapshot_directory("tests") { + os.exit(1) + } + } diff --git a/tools/odinfmt/tests.sh b/tools/odinfmt/tests.sh new file mode 100755 index 0000000..d30d325 --- /dev/null +++ b/tools/odinfmt/tests.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +cd "${0%/*}" + +odin run tests.odin -file -collection:shared=../../src -out:tests.exe + +if ([ $? -ne 0 ]) +then + exit 1 +fi |