summaryrefslogtreecommitdiff
path: root/include/test.mk
diff options
context:
space:
mode:
Diffstat (limited to 'include/test.mk')
-rw-r--r--include/test.mk12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/test.mk b/include/test.mk
index f70fdaa9..8cdcc332 100644
--- a/include/test.mk
+++ b/include/test.mk
@@ -28,6 +28,12 @@ CFLAGS = -O2 -ggdb -std=gnu11 \
-DSHIM_UNIT_TEST \
"-DDEFAULT_DEBUG_PRINT_STATE=$(DEBUG_PRINTS)"
+$(wildcard test-*.c) :: %.c : test-random.h
+
+test-random.h:
+ dd if=/dev/urandom bs=512 count=17 of=random.bin
+ xxd -i random.bin test-random.h
+
tests := $(patsubst %.c,%,$(wildcard test-*.c))
$(tests) :: test-% : test.c test-%.c $(test-%_FILES)
@@ -36,10 +42,12 @@ $(tests) :: test-% : test.c test-%.c $(test-%_FILES)
test : $(tests)
-all : test
-
clean :
+ @rm -vf test-random.h random.bin
+
+all : clean test
.PHONY: $(tests) all test clean
+.SECONDARY: random.bin
# vim:ft=make