updated tests
authorYann Collet <cyan@fb.com>
Thu, 16 May 2019 23:46:16 +0000 (16:46 -0700)
committerYann Collet <cyan@fb.com>
Thu, 16 May 2019 23:46:16 +0000 (16:46 -0700)
- only play listTest with `make test`, not `make all` which is limited to build
- update `clangtest`, so that it's possible to disable O3 optimization, for faster processing

.circleci/config.yml
Makefile
tests/Makefile

index 4c08cb2..a620cd1 100644 (file)
@@ -10,7 +10,7 @@ version: 2
 jobs:
   build:
     working_directory: ~/lz4/lz4
-    parallelism: 1
+    parallelism: 2
     shell: /bin/bash --login
     # CircleCI 2.0 does not support environment variables that refer to each other the same way as 1.0 did.
     # If any of these refer to each other, rewrite them so that they don't or see https://circleci.com/docs/2.0/env-vars/#interpolating-environment-variables-to-set-other-environment-variables .
@@ -71,7 +71,7 @@ jobs:
     # Test
     #   This would typically be a build job when using workflows, possibly combined with build
     # This is based on your 1.0 configuration file or project settings
-    - run: clang -v; make clangtest && make clean
+    - run: CFLAGS= make clangtest && make clean
     - run: g++ -v; make gpptest     && make clean
     - run: gcc -v; make c_standards && make clean
     - run: gcc -v; g++ -v; make ctocpptest && make clean
index dd731eb..e24cec5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -125,11 +125,14 @@ test:
        $(MAKE) -C $(TESTDIR) $@
        $(MAKE) -C $(EXDIR) $@
 
+clangtest: CFLAGS ?= -O3
+clangtest: CFLAGS += -Werror -Wconversion -Wno-sign-conversion
+clangtest: CC = clang
 clangtest: clean
-       clang -v
-       @CFLAGS="-O3 -Werror -Wconversion -Wno-sign-conversion" $(MAKE) -C $(LZ4DIR)  all CC=clang
-       @CFLAGS="-O3 -Werror -Wconversion -Wno-sign-conversion" $(MAKE) -C $(PRGDIR)  all CC=clang
-       @CFLAGS="-O3 -Werror -Wconversion -Wno-sign-conversion" $(MAKE) -C $(TESTDIR) all CC=clang
+       $(CC) -v
+       @CFLAGS="$(CFLAGS)" $(MAKE) -C $(LZ4DIR)  all CC=$(CC)
+       @CFLAGS="$(CFLAGS)" $(MAKE) -C $(PRGDIR)  all CC=$(CC)
+       @CFLAGS="$(CFLAGS)" $(MAKE) -C $(TESTDIR) all CC=$(CC)
 
 clangtest-native: clean
        clang -v
index dbb7bd5..a38031a 100644 (file)
@@ -55,7 +55,7 @@ NB_LOOPS     ?= -i1
 
 default: all
 
-all: fullbench fuzzer frametest roundTripTest datagen checkFrame listTest
+all: fullbench fuzzer frametest roundTripTest datagen checkFrame
 
 all32: CFLAGS+=-m32
 all32: all
@@ -153,7 +153,7 @@ 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: test-lz4 test-lz4c test-frametest test-fullbench test-fuzzer test-install test-amalgamation
+test: test-lz4 test-lz4c test-frametest test-fullbench test-fuzzer test-install test-amalgamation listTest
 
 .PHONY: test32
 test32: CFLAGS+=-m32