[amalgamation] add test
authorBing Xu <bingxu@fb.com>
Fri, 16 Nov 2018 17:12:26 +0000 (09:12 -0800)
committerBing Xu <bingxu@fb.com>
Fri, 16 Nov 2018 17:37:19 +0000 (09:37 -0800)
tests/Makefile

index 989ef85..24dc581 100644 (file)
@@ -152,11 +152,17 @@ endif
 DD:=dd
 
 
-test: test-lz4 test-lz4c test-frametest test-fullbench test-fuzzer test-install
+test: test-lz4 test-lz4c test-frametest test-fullbench test-fuzzer test-install test-amalgamation
 
 test32: CFLAGS+=-m32
 test32: test
 
+test-amalgamation: $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c
+       cat $(LZ4DIR)/lz4.c > lz4_all.c
+       cat $(LZ4DIR)/lz4hc.c >> lz4_all.c
+       $(CC) -I$(LZ4DIR) -c lz4_all.c
+       $(RM) lz4_all.c
+
 test-install: lz4 lib liblz4.pc
        lz4_root=.. ./test_install.sh