diff options
-rw-r--r-- | .travis.yml | 18 | ||||
-rw-r--r-- | Makefile | 20 | ||||
-rw-r--r-- | programs/Makefile | 49 |
3 files changed, 65 insertions, 22 deletions
diff --git a/.travis.yml b/.travis.yml index 472ca18..c2d92e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,24 @@ language: c compiler: gcc -script: make test +script: make test-travis before_install: - - sudo apt-get update -qq + - sudo apt-get update -qq - sudo apt-get install -qq gcc-multilib - sudo apt-get install -qq valgrind env: - - LZ4_TRAVIS_CI_ENV=-m32 - - LZ4_TRAVIS_CI_ENV=-m64 + - LZ4_TRAVIS_CI_ENV=-dist + - LZ4_TRAVIS_CI_ENV=-examples + - LZ4_TRAVIS_CI_ENV=-lz4 + - LZ4_TRAVIS_CI_ENV=-lz4c + - LZ4_TRAVIS_CI_ENV=-lz4c32 + - LZ4_TRAVIS_CI_ENV=-fullbench + - LZ4_TRAVIS_CI_ENV=-fullbench32 + - LZ4_TRAVIS_CI_ENV=-fuzzer + - LZ4_TRAVIS_CI_ENV=-fuzzer32 + - LZ4_TRAVIS_CI_ENV=-frametest + - LZ4_TRAVIS_CI_ENV=-frametest32 + - LZ4_TRAVIS_CI_ENV=-mem matrix: fast_finish: true @@ -89,6 +89,16 @@ NONTEXT = images/image00.png images/image01.png images/image02.png \ SOURCES = $(TEXT) $(NONTEXT) +# Select test target for Travis CI's Build Matrix +ifeq ($(LZ4_TRAVIS_CI_ENV),-dist) +TRAVIS_TARGET=dist +else ifeq ($(LZ4_TRAVIS_CI_ENV),-examples) +TRAVIS_TARGET=examples +else +TRAVIS_TARGET=test-prg +endif + + default: liblz4 @cd $(PRGDIR); $(MAKE) -e @@ -167,8 +177,14 @@ dist: clean @echo Distribution $(DISTRIBNAME) built test: - make dist - @cd examples; $(MAKE) -e $@ @cd $(PRGDIR); $(MAKE) -e $@ +test-travis: $(TRAVIS_TARGET) + +examples: + cd examples; $(MAKE) -e test + +test-prg: + @cd $(PRGDIR); $(MAKE) -e test-travis + endif diff --git a/programs/Makefile b/programs/Makefile index 00af2f9..fa2f391 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -45,15 +45,6 @@ LZ4DIR=.. TEST_FILES = COPYING TEST_TARGETS=test-native -BENCH_NB=-i5 - -# Minimize test target for Travis CI's Build Matrix -ifeq ($(LZ4_TRAVIS_CI_ENV),-m32) -TEST_TARGETS=test-force32 -BENCH_NB=-i1 -else ifeq ($(LZ4_TRAVIS_CI_ENV),-m64) -BENCH_NB=-i1 -endif # Define *.exe as extension for Windows systems @@ -66,9 +57,35 @@ VOID = /dev/null endif +# Select test target for Travis CI's Build Matrix +ifeq ($(LZ4_TRAVIS_CI_ENV),-lz4) +TRAVIS_TARGET=test-lz4 +else ifeq ($(LZ4_TRAVIS_CI_ENV),-lz4c) +TRAVIS_TARGET=test-lz4c +else ifeq ($(LZ4_TRAVIS_CI_ENV),-lz4c32) +TRAVIS_TARGET=test-lz4c32 +else ifeq ($(LZ4_TRAVIS_CI_ENV),-fullbench) +TRAVIS_TARGET=test-fullbench +else ifeq ($(LZ4_TRAVIS_CI_ENV),-fullbench32) +TRAVIS_TARGET=test-fullbench32 +else ifeq ($(LZ4_TRAVIS_CI_ENV),-fuzzer) +TRAVIS_TARGET=test-fuzzer +else ifeq ($(LZ4_TRAVIS_CI_ENV),-fuzzer32) +TRAVIS_TARGET=test-fuzzer32 +else ifeq ($(LZ4_TRAVIS_CI_ENV),-frametest) +TRAVIS_TARGET=test-frametest +else ifeq ($(LZ4_TRAVIS_CI_ENV),-frametest32) +TRAVIS_TARGET=test-frametest32 +else ifeq ($(LZ4_TRAVIS_CI_ENV),-mem) +TRAVIS_TARGET=test-mem +else +TRAVIS_TARGET=test +endif + + default: lz4 lz4c -all: lz4 lz4c lz4c32 fullbench fullbench32 fuzzer fuzzer32 frametest datagen +all: lz4 lz4c lz4c32 fullbench fullbench32 fuzzer fuzzer32 frametest frametest32 datagen lz4: $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c $(LZ4DIR)/xxhash.c bench.c lz4io.c lz4cli.c $(CC) $(FLAGS) -DDISABLE_LZ4C_LEGACY_OPTIONS $^ -o $@$(EXT) @@ -136,13 +153,13 @@ uninstall: [ -f $(DESTDIR)$(MANDIR)/lz4cat.1 ] && rm -f $(DESTDIR)$(MANDIR)/lz4cat.1 @echo lz4 successfully uninstalled -test-native: test-lz4 test-lz4c test-frame test-fullbench test-fuzzer test-mem +test: test-lz4 test-lz4c test-frame test-fullbench test-fuzzer test-mem -test-force32: test-lz4c32 test-frame32 test-fullbench32 test-fuzzer32 test-mem32 +test32: test-lz4c32 test-frame32 test-fullbench32 test-fuzzer32 test-mem32 -test-all: test-native test-force32 +test-all: test test32 -test: $(TEST_TARGETS) +test-travis: $(TRAVIS_TARGET) test-lz4: lz4 datagen ./datagen -g16KB | ./lz4 -9 | ./lz4 -vdq > $(VOID) @@ -162,10 +179,10 @@ test-lz4c32: lz4 lz4c32 lz4 datagen ./datagen -g6GB | ./lz4c32 -vqB5D | ./lz4c32 -vdq > $(VOID) test-fullbench: fullbench - ./fullbench --no-prompt $(BENCH_NB) $(TEST_FILES) + ./fullbench --no-prompt $(TEST_FILES) test-fullbench32: fullbench32 - ./fullbench32 --no-prompt $(BENCH_NB) $(TEST_FILES) + ./fullbench32 --no-prompt $(TEST_FILES) test-fuzzer: fuzzer ./fuzzer |