diff options
author | Yann Collet <cyan@fb.com> | 2017-05-10 21:51:09 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2017-05-10 21:51:09 (GMT) |
commit | 2012e4de9e2c33a5abb34d40082afc8918852c6e (patch) | |
tree | 0f36eb7c004111c903be43a8076cb500e17fd0e1 | |
parent | a902127613921408bb02b1debe9371e9bcfaf9f2 (diff) | |
download | lz4-2012e4de9e2c33a5abb34d40082afc8918852c6e.zip lz4-2012e4de9e2c33a5abb34d40082afc8918852c6e.tar.gz lz4-2012e4de9e2c33a5abb34d40082afc8918852c6e.tar.bz2 |
fixed c_standards tests
and added entry "make list"
-rw-r--r-- | Makefile | 24 | ||||
-rw-r--r-- | tests/frametest.c | 3 |
2 files changed, 16 insertions, 11 deletions
@@ -56,7 +56,10 @@ endif default: lib lz4-release .PHONY: all -all: default examples manuals +all: allmost manuals + +.PHONY: allmost +allmost: lib lz4 examples .PHONY: lib lib: @@ -68,7 +71,7 @@ lz4 lz4-release: lib @cp $(PRGDIR)/lz4$(EXT) . .PHONY: examples -examples: lib lz4-release +examples: lib lz4 $(MAKE) -C $(EXDIR) test .PHONY: manuals @@ -116,6 +119,10 @@ endif #------------------------------------------------------------------------ ifneq (,$(filter $(HOST_OS),MSYS POSIX)) +.PHONY: list +list: + @$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs + .PHONY: test test: $(MAKE) -C $(TESTDIR) $@ @@ -166,13 +173,10 @@ gpptest32: clean CC=g++ $(MAKE) -C $(TESTDIR) native CFLAGS="-m32 -O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror" c_standards: clean - $(MAKE) all MOREFLAGS="-std=gnu90 -Werror" - $(MAKE) clean - $(MAKE) all MOREFLAGS="-std=c99 -Werror" - $(MAKE) clean - $(MAKE) all MOREFLAGS="-std=gnu99 -Werror" - $(MAKE) clean - $(MAKE) all MOREFLAGS="-std=c11 -Werror" - $(MAKE) clean + # note : lz4 is not C90 compatible, because it requires long long support + CFLAGS="-std=gnu90 -Werror" $(MAKE) clean allmost + CFLAGS="-std=c99 -Werror" $(MAKE) clean allmost + CFLAGS="-std=gnu99 -Werror" $(MAKE) clean allmost + CFLAGS="-std=c11 -Werror" $(MAKE) clean allmost endif diff --git a/tests/frametest.c b/tests/frametest.c index a4c548e..04597a4 100644 --- a/tests/frametest.c +++ b/tests/frametest.c @@ -290,7 +290,8 @@ int basicTests(U32 seed, double compressibility) { size_t nullSize = 0; size_t const fiError = LZ4F_getFrameInfo(dCtx, &fi, ip, &nullSize); if (LZ4F_getErrorCode(fiError) != LZ4F_ERROR_frameHeader_incomplete) { - DISPLAYLEVEL(3, "incorrect error : %s != ERROR_frameHeader_incomplete \n", LZ4F_getErrorName(fiError)); + DISPLAYLEVEL(3, "incorrect error : %s != ERROR_frameHeader_incomplete \n", + LZ4F_getErrorName(fiError)); goto _output_error; } DISPLAYLEVEL(3, " correctly failed : %s \n", LZ4F_getErrorName(fiError)); |