summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrzemyslaw Skibinski <inikep@gmail.com>2016-11-08 09:43:18 (GMT)
committerPrzemyslaw Skibinski <inikep@gmail.com>2016-11-08 09:43:18 (GMT)
commit2302649138b58c1981ede7c117c098a03b34fb8d (patch)
treea3c4e479d3422e7b88fd7cd7b86600b53d8b8342
parentc201327f14debdec7572f297eeae195c510e6a9f (diff)
downloadlz4-2302649138b58c1981ede7c117c098a03b34fb8d.zip
lz4-2302649138b58c1981ede7c117c098a03b34fb8d.tar.gz
lz4-2302649138b58c1981ede7c117c098a03b34fb8d.tar.bz2
tests\Makefile: added test-platform
-rw-r--r--.travis.yml8
-rw-r--r--Makefile15
-rw-r--r--programs/Makefile3
-rw-r--r--tests/Makefile10
4 files changed, 21 insertions, 15 deletions
diff --git a/.travis.yml b/.travis.yml
index db05635..35088fa 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -27,7 +27,7 @@ matrix:
- valgrind
- clang
- - env: Ubu=14.04 Cmd='make platformTest CC=arm-linux-gnueabi-gcc' COMPILER=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static
+ - env: Ubu=14.04 Cmd='make platformTest CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static' COMPILER=arm-linux-gnueabi-gcc
dist: trusty
sudo: required
addons:
@@ -39,7 +39,7 @@ matrix:
- libc6-dev-armel-cross
- linux-libc-dev-armel-cross
- - env: Ubu=14.04 Cmd='make platformTest CC=aarch64-linux-gnu-gcc' COMPILER=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static
+ - env: Ubu=14.04 Cmd='make platformTest CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static' COMPILER=aarch64-linux-gnu-gcc
dist: trusty
sudo: required
addons:
@@ -49,7 +49,7 @@ matrix:
- qemu-user-static
- gcc-aarch64-linux-gnu
- - env: Ubu=14.04 Cmd='make platformTest CC=powerpc-linux-gnu-gcc' COMPILER=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static
+ - env: Ubu=14.04 Cmd='make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static' COMPILER=powerpc-linux-gnu-gcc
dist: trusty
sudo: required
addons:
@@ -87,7 +87,7 @@ matrix:
- gcc-multilib
- gcc-5
- gcc-5-multilib
- - env: Ubu=14.04 Cmd='make c_standards CC=gcc-6 MOREFLAGS="-Werror" && make -C tests test-lz4 CC=gcc-6 MOREFLAGS="-Werror"' COMPILER=gcc-6
+ - env: Ubu=14.04 Cmd='make c_standards CC=gcc-6 && make -C tests test-lz4 CC=gcc-6 MOREFLAGS="-Werror"' COMPILER=gcc-6
dist: trusty
sudo: required
addons:
diff --git a/Makefile b/Makefile
index c54a4b1..8f32efe 100644
--- a/Makefile
+++ b/Makefile
@@ -97,13 +97,13 @@ gpptest: clean
$(MAKE) all CC=g++ CFLAGS="-O3 -I../lib -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror"
c_standards: clean
- $(MAKE) all CFLAGS="-std=gnu90"
+ $(MAKE) all MOREFLAGS="-std=gnu90 -Werror"
$(MAKE) clean
- $(MAKE) all CFLAGS="-std=c99"
+ $(MAKE) all MOREFLAGS="-std=c99 -Werror"
$(MAKE) clean
- $(MAKE) all CFLAGS="-std=gnu99"
+ $(MAKE) all MOREFLAGS="-std=gnu99 -Werror"
$(MAKE) clean
- $(MAKE) all CFLAGS="-std=c11"
+ $(MAKE) all MOREFLAGS="-std=c11 -Werror"
$(MAKE) clean
clangtest: clean
@@ -116,9 +116,10 @@ staticAnalyze: clean
scan-build --status-bugs -v $(MAKE) all CFLAGS=-g
platformTest: clean
- $(MAKE) -C $(LZ4DIR) all CFLAGS="-Werror -static -O3 -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wpointer-arith"
- $(MAKE) -C $(PRGDIR) bins CFLAGS="-Werror -static -O3 -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wpointer-arith"
- $(MAKE) -C $(TESTDIR) bins CFLAGS="-Werror -static -O3 -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wpointer-arith"
+ $(MAKE) -C $(LZ4DIR) all MOREFLAGS="-Werror"
+ $(MAKE) -C $(PRGDIR) bins MOREFLAGS="-Werror -static"
+ $(MAKE) -C $(TESTDIR) bins MOREFLAGS="-Werror -static"
+ $(MAKE) -C $(TESTDIR) test-platform
versionsTest: clean
$(MAKE) -C $(TESTDIR) $@
diff --git a/programs/Makefile b/programs/Makefile
index 39672b3..9d8929a 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -36,9 +36,8 @@ LZ4DIR := ../lib
CFLAGS ?= -O3 # can select custom flags. For example : CFLAGS="-O2 -g" make
CFLAGS += -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wpointer-arith
-CFLAGS += $(MOREFLAGS)
CPPFLAGS:= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_ -DLZ4_DLL_EXPORT=1
-FLAGS := $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
+FLAGS := $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(MOREFLAGS)
# Define *.exe as extension for Windows systems
diff --git a/tests/Makefile b/tests/Makefile
index d5aad60..d901647 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -43,9 +43,8 @@ PYTHON?= python3
CFLAGS ?= -O3 # can select custom flags. For example : CFLAGS="-O2 -g" make
CFLAGS += -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes
-CFLAGS += $(MOREFLAGS)
CPPFLAGS:= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_ -DLZ4_DLL_EXPORT=1
-FLAGS := $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
+FLAGS := $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(MOREFLAGS)
# Define *.exe as extension for Windows systems
@@ -250,6 +249,13 @@ test-lz4c32-basic: lz4c32 datagen
./datagen -g256MB | $(PRGDIR)/lz4c32 -vqB4D | $(PRGDIR)/lz4c32 -qt
./datagen -g6GB | $(PRGDIR)/lz4c32 -vqB5D | $(PRGDIR)/lz4c32 -qt
+test-platform:
+ @echo "\n ---- test lz4 $(QEMU_SYS) platform ----"
+ $(QEMU_SYS) ./datagen -g16KB | $(QEMU_SYS) $(PRGDIR)/lz4 -9 | $(QEMU_SYS) $(PRGDIR)/lz4 -t
+ $(QEMU_SYS) ./datagen | $(QEMU_SYS) $(PRGDIR)/lz4 | $(QEMU_SYS) $(PRGDIR)/lz4 -t
+ $(QEMU_SYS) ./datagen -g256MB | $(QEMU_SYS) $(PRGDIR)/lz4 -vqB4D | $(QEMU_SYS) $(PRGDIR)/lz4 -qt
+ $(QEMU_SYS) ./datagen -g6GB | $(QEMU_SYS) $(PRGDIR)/lz4 -vqB5D | $(QEMU_SYS) $(PRGDIR)/lz4 -qt
+
test-lz4c32: test-lz4c32-basic test-interop-32-64
test-fullbench: fullbench