aboutsummaryrefslogtreecommitdiff
path: root/test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test.sh')
-rwxr-xr-xtest.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/test.sh b/test.sh
new file mode 100755
index 0000000..0cad28a
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname -- "$0")
+
+CC=${CC:-gcc}
+SRC="src_c/arch/posix.c $(find src_c -maxdepth 1 -name '*.c' -a ! -name 'main.c')"
+OUT=build/test
+ARCH=LSP_ARCH_POSIX
+CFLAGS="-O2"
+
+mkdir -p build/test
+
+for i in test_c/*.c; do
+ name=$(basename $i .c)
+ $CC -DLSP_ARCH=$ARCH $CFLAGS -o $OUT/$name $SRC $i
+ $OUT/$name
+done