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
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
@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
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
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)
[ -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)
./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