diff options
Diffstat (limited to 'test/run-tests')
| -rwxr-xr-x | test/run-tests | 33 | 
1 files changed, 33 insertions, 0 deletions
diff --git a/test/run-tests b/test/run-tests new file mode 100755 index 0000000..e19b611 --- /dev/null +++ b/test/run-tests @@ -0,0 +1,33 @@ +#!/bin/sh + +set -e +cd "${0%/*}" + +readonly FLAGS=' +	-std=c23 -I../include +	-Og -ggdb3 +	-Wall -Wextra -Wpedantic +	-Wno-pointer-sign +	-Wno-attributes +' + +(cd ..; ./make) + +./gen-test-data + +for src in *.c +do +	dst="${src%.*}" +	gcc $FLAGS -o "$dst" "$src" ../libmlib.a  +done + +s="$(find . -type f -executable \ +	-not -name gen-test-data \ +	-not -name run-tests \ +	-exec echo rm "*.in" {} +)" +trap "$s" EXIT + +find . -type f -executable \ +	-not -name gen-test-data \ +	-not -name run-tests \ +	-exec {} \;  |