aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/test.sh12
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
3detectsan() { cc -fsanitize=$1 -dM -E -x c - </dev/null | grep "SANITIZE"; }
4
3re="${TEST:-$@}" 5re="${TEST:-$@}"
4 6
5CC="cc -DDEBUG -std=c99 -pedantic -Wall -Wextra \ 7CC="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"
7if [ "$CUBETYPE" = "CUBE_AVX2" ]; then 9
8 CC="$CC -mavx2" 10[ "$CUBETYPE" = "CUBE_AVX2" ] && CC="$CC -mavx2"
9fi 11[ -n "$(detectsan address)" ] && CC="$CC -fsanitize=address"
10if [ "$(uname)" != "OpenBSD" ]; then 12[ -n "$(detectsan undefined)" ] && CC="$CC -fsanitize=undefined"
11 CC="$CC -fsanitize=address -fsanitize=undefined"
12fi
13 13
14TESTBIN="test/run" 14TESTBIN="test/run"
15TESTOUT="test/last.out" 15TESTOUT="test/last.out"

Generated with cgit - Back to sebastiano.tronto.net