diff options
Diffstat (limited to 'test/test.sh')
| -rwxr-xr-x | test/test.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test.sh b/test/test.sh index 68b87aa..3adee3a 100755 --- a/test/test.sh +++ b/test/test.sh | |||
| @@ -1,15 +1,15 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | detectsan() { cc -fsanitize=$1 -dM -E -x c - </dev/null | grep "SANITIZE"; } | ||
| 4 | |||
| 3 | re="${TEST:-$@}" | 5 | re="${TEST:-$@}" |
| 4 | 6 | ||
| 5 | CC="cc -DDEBUG -std=c99 -pedantic -Wall -Wextra \ | 7 | CC="cc -DDEBUG -std=c99 -pedantic -Wall -Wextra \ |
| 6 | -Wno-unused-parameter -Wno-unused-function -g3 -D$CUBETYPE" | 8 | -Wno-unused-parameter -Wno-unused-function -g3 -D$CUBETYPE" |
| 7 | if [ "$CUBETYPE" = "CUBE_AVX2" ]; then | 9 | |
| 8 | CC="$CC -mavx2" | 10 | [ "$CUBETYPE" = "CUBE_AVX2" ] && CC="$CC -mavx2" |
| 9 | fi | 11 | [ -n "$(detectsan address)" ] && CC="$CC -fsanitize=address" |
| 10 | if [ "$(uname)" != "OpenBSD" ]; then | 12 | [ -n "$(detectsan undefined)" ] && CC="$CC -fsanitize=undefined" |
| 11 | CC="$CC -fsanitize=address -fsanitize=undefined" | ||
| 12 | fi | ||
| 13 | 13 | ||
| 14 | TESTBIN="test/run" | 14 | TESTBIN="test/run" |
| 15 | TESTOUT="test/last.out" | 15 | TESTOUT="test/last.out" |
