summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2014-11-04 19:56:38 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2014-11-04 19:56:38 (GMT)
commit73554386ed8c9b08940411c0e62bbdca3216f8cd (patch)
tree618e58f16d0398e4dbd50e97c12e2a5b6304e2c6
parent4befab0fcc741101c4cfd4b81a6ca60ba5a4dafe (diff)
downloadlz4-73554386ed8c9b08940411c0e62bbdca3216f8cd.zip
lz4-73554386ed8c9b08940411c0e62bbdca3216f8cd.tar.gz
lz4-73554386ed8c9b08940411c0e62bbdca3216f8cd.tar.bz2
Makefile : refactored Travis CI tests
-rw-r--r--.travis.yml27
-rw-r--r--Makefile16
-rw-r--r--programs/Makefile27
3 files changed, 24 insertions, 46 deletions
diff --git a/.travis.yml b/.travis.yml
index 2a2623c..67bde9b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,19 +7,20 @@ before_install:
- sudo apt-get install -qq valgrind
env:
- - LZ4_TRAVIS_CI_ENV=-dist
- - LZ4_TRAVIS_CI_ENV=-cmake
- - 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
+ - LZ4_TRAVIS_CI_ENV=liblz4
+ - LZ4_TRAVIS_CI_ENV=streaming-examples
+ - LZ4_TRAVIS_CI_ENV=cmake
+ - LZ4_TRAVIS_CI_ENV=dist
+ - LZ4_TRAVIS_CI_ENV=test-lz4
+ - LZ4_TRAVIS_CI_ENV=test-lz4c
+ - LZ4_TRAVIS_CI_ENV=test-lz4c32
+ - LZ4_TRAVIS_CI_ENV=test-fullbench
+ - LZ4_TRAVIS_CI_ENV=test-fullbench32
+ - LZ4_TRAVIS_CI_ENV=test-fuzzer
+ - LZ4_TRAVIS_CI_ENV=test-fuzzer32
+ - LZ4_TRAVIS_CI_ENV=test-frametest
+ - LZ4_TRAVIS_CI_ENV=test-frametest32
+ - LZ4_TRAVIS_CI_ENV=test-mem
matrix:
fast_finish: true
diff --git a/Makefile b/Makefile
index c0b7a6f..586ac5e 100644
--- a/Makefile
+++ b/Makefile
@@ -90,14 +90,10 @@ 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),-cmake)
-TRAVIS_TARGET=cmake
-else ifeq ($(LZ4_TRAVIS_CI_ENV),-examples)
-TRAVIS_TARGET=examples
+ifneq (,$(filter test-%,$(LZ4_TRAVIS_CI_ENV)))
+TRAVIS_TARGET=prg-travis
else
-TRAVIS_TARGET=test-prg
+TRAVIS_TARGET=$(LZ4_TRAVIS_CI_ENV)
endif
@@ -113,7 +109,7 @@ liblz4: lz4.c lz4hc.c
@echo compiling static library
@$(CC) $(CPPFLAGS) $(CFLAGS) -c $^
@$(AR) rcs liblz4.a lz4.o lz4hc.o
- @echo compiling dynamic library
+ @echo compiling dynamic library $(LIBVER)
@$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared $^ -fPIC $(SONAME_FLAGS) -o $@.$(SHARED_EXT_VER)
@echo creating versioned links
@ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT_MAJOR)
@@ -186,10 +182,10 @@ test-travis: $(TRAVIS_TARGET)
cmake:
@cd cmake_unofficial; cmake CMakeLists.txt; $(MAKE)
-examples:
+streaming-examples:
cd examples; $(MAKE) -e test
-test-prg:
+prg-travis:
@cd $(PRGDIR); $(MAKE) -e test-travis
endif
diff --git a/programs/Makefile b/programs/Makefile
index ba08cfb..1d7e17f 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -58,29 +58,7 @@ 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
+TRAVIS_TARGET=$(LZ4_TRAVIS_CI_ENV)
default: lz4 lz4c
@@ -166,6 +144,7 @@ test-lz4: lz4 datagen
./datagen | ./lz4 | ./lz4 -vdq > $(VOID)
./datagen -g256MB | ./lz4 -vqB4D | ./lz4 -vdq > $(VOID)
./datagen -g6GB | ./lz4 -vqB5D | ./lz4 -vdq > $(VOID)
+# test frame concatenation with null-length frame
echo -n > empty.test
echo hi > nonempty.test
cat nonempty.test empty.test nonempty.test > orig.test
@@ -175,6 +154,8 @@ test-lz4: lz4 datagen
./lz4 -d concat.lz4.test > result.test
sdiff orig.test result.test
@rm *.test
+ @echo frame concatenation test completed
+# test frame concatenation with null-length frame
test-lz4c: lz4c datagen