2016-11-03 14:03:43 +00:00
|
|
|
# ##########################################################################
|
|
|
|
# LZ4 programs - Makefile
|
|
|
|
# Copyright (C) Yann Collet 2011-2016
|
|
|
|
#
|
|
|
|
# GPL v2 License
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License along
|
|
|
|
# with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
#
|
|
|
|
# You can contact the author at :
|
|
|
|
# - LZ4 homepage : http://www.lz4.org
|
2016-11-03 14:12:57 +00:00
|
|
|
# - LZ4 source repository : https://github.com/lz4/lz4
|
2016-11-03 14:03:43 +00:00
|
|
|
# ##########################################################################
|
|
|
|
# fuzzer : Test tool, to check lz4 integrity on target platform
|
|
|
|
# frametest : Test tool, to check lz4frame integrity on target platform
|
|
|
|
# fullbench : Precisely measure speed for each LZ4 function variant
|
|
|
|
# datagen : generates synthetic data samples for tests & benchmarks
|
|
|
|
# ##########################################################################
|
|
|
|
|
|
|
|
DESTDIR ?=
|
|
|
|
PREFIX ?= /usr/local
|
|
|
|
BINDIR := $(PREFIX)/bin
|
|
|
|
MANDIR := $(PREFIX)/share/man/man1
|
2016-11-17 21:02:06 +00:00
|
|
|
LIBDIR := ../lib
|
2016-11-03 14:03:43 +00:00
|
|
|
PRGDIR := ../programs
|
2016-11-17 21:02:06 +00:00
|
|
|
VOID := /dev/null
|
2016-11-03 15:17:38 +00:00
|
|
|
TESTDIR := versionsTest
|
2016-11-10 09:25:41 +00:00
|
|
|
PYTHON ?= python3
|
2016-11-03 14:03:43 +00:00
|
|
|
|
2016-12-07 23:52:07 +00:00
|
|
|
CFLAGS ?= -O3 # can select custom optimization flags. For example : CFLAGS=-O2 make
|
2016-11-19 01:54:26 +00:00
|
|
|
CFLAGS += -g -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum \
|
2016-11-14 18:16:11 +00:00
|
|
|
-Wdeclaration-after-statement -Wstrict-prototypes \
|
|
|
|
-Wpointer-arith -Wstrict-aliasing=1
|
2016-11-08 10:16:16 +00:00
|
|
|
CFLAGS += $(MOREFLAGS)
|
2016-11-17 21:02:06 +00:00
|
|
|
CPPFLAGS:= -I$(LIBDIR) -DXXH_NAMESPACE=LZ4_
|
|
|
|
FLAGS = $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
2016-11-03 14:03:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Define *.exe as extension for Windows systems
|
|
|
|
ifneq (,$(filter Windows%,$(OS)))
|
|
|
|
EXT =.exe
|
|
|
|
else
|
|
|
|
EXT =
|
|
|
|
endif
|
2016-11-17 21:02:06 +00:00
|
|
|
LZ4 := $(PRGDIR)/lz4$(EXT)
|
2016-11-03 14:03:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Default test parameters
|
|
|
|
TEST_FILES := COPYING
|
2016-11-10 08:04:40 +00:00
|
|
|
FUZZER_TIME := -T3mn
|
2016-11-10 09:25:41 +00:00
|
|
|
NB_LOOPS ?= -i1
|
2016-11-03 14:03:43 +00:00
|
|
|
|
|
|
|
|
2016-11-17 21:02:06 +00:00
|
|
|
default: all
|
2016-11-03 14:03:43 +00:00
|
|
|
|
2016-11-17 21:02:06 +00:00
|
|
|
all: fullbench fuzzer frametest datagen fasttest
|
2016-11-03 14:03:43 +00:00
|
|
|
|
2016-11-17 21:02:06 +00:00
|
|
|
all32: CFLAGS+=-m32
|
|
|
|
all32: all
|
2016-11-03 14:03:43 +00:00
|
|
|
|
|
|
|
lz4:
|
2016-11-17 21:02:06 +00:00
|
|
|
$(MAKE) -C $(PRGDIR) clean $@ CFLAGS="$(CFLAGS)"
|
2016-11-03 14:03:43 +00:00
|
|
|
|
|
|
|
lz4c:
|
2016-11-17 21:02:06 +00:00
|
|
|
$(MAKE) -C $(PRGDIR) clean $@ CFLAGS="$(CFLAGS)"
|
2016-11-03 14:03:43 +00:00
|
|
|
|
2016-11-17 21:02:06 +00:00
|
|
|
lz4c32: # create a 32-bits version for 32/64 interop tests
|
|
|
|
$(MAKE) -C $(PRGDIR) clean $@ CFLAGS="-m32 $(CFLAGS)"
|
|
|
|
cp $(LZ4) $(LZ4)c32
|
2016-11-03 14:03:43 +00:00
|
|
|
|
2016-11-17 21:02:06 +00:00
|
|
|
fullbench : $(LIBDIR)/lz4.o $(LIBDIR)/lz4hc.o $(LIBDIR)/lz4frame.o $(LIBDIR)/xxhash.o fullbench.c
|
2016-11-03 14:03:43 +00:00
|
|
|
$(CC) $(FLAGS) $^ -o $@$(EXT)
|
|
|
|
|
2016-11-17 21:02:06 +00:00
|
|
|
fullbench-lib: fullbench.c $(LIBDIR)/xxhash.c
|
|
|
|
$(MAKE) -C $(LIBDIR) liblz4.a
|
|
|
|
$(CC) $(FLAGS) $^ -o $@$(EXT) $(LIBDIR)/liblz4.a
|
2016-11-03 14:03:43 +00:00
|
|
|
|
2016-11-17 21:02:06 +00:00
|
|
|
fullbench-dll: fullbench.c $(LIBDIR)/xxhash.c
|
|
|
|
$(MAKE) -C $(LIBDIR) liblz4
|
|
|
|
$(CC) $(FLAGS) $^ -o $@$(EXT) -DLZ4_DLL_IMPORT=1 $(LIBDIR)/dll/liblz4.dll
|
2016-11-09 14:19:29 +00:00
|
|
|
|
2016-11-17 21:02:06 +00:00
|
|
|
fuzzer : $(LIBDIR)/lz4.o $(LIBDIR)/lz4hc.o $(LIBDIR)/xxhash.o fuzzer.c
|
2016-11-03 14:03:43 +00:00
|
|
|
$(CC) $(FLAGS) $^ -o $@$(EXT)
|
|
|
|
|
2016-11-17 21:02:06 +00:00
|
|
|
frametest: $(LIBDIR)/lz4frame.o $(LIBDIR)/lz4.o $(LIBDIR)/lz4hc.o $(LIBDIR)/xxhash.o frametest.c
|
2016-11-03 14:03:43 +00:00
|
|
|
$(CC) $(FLAGS) $^ -o $@$(EXT)
|
|
|
|
|
2016-11-17 21:02:06 +00:00
|
|
|
fasttest: $(LIBDIR)/lz4.o fasttest.c
|
2016-11-05 02:59:50 +00:00
|
|
|
$(CC) $(FLAGS) $^ -o $@$(EXT)
|
|
|
|
|
2016-11-03 14:03:43 +00:00
|
|
|
datagen : $(PRGDIR)/datagen.c datagencli.c
|
|
|
|
$(CC) $(FLAGS) -I$(PRGDIR) $^ -o $@$(EXT)
|
|
|
|
|
|
|
|
clean:
|
2016-11-17 21:02:06 +00:00
|
|
|
@$(MAKE) -C $(LIBDIR) $@ > $(VOID)
|
2016-11-17 22:39:49 +00:00
|
|
|
@$(MAKE) -C $(PRGDIR) $@ > $(VOID)
|
2016-11-03 14:03:43 +00:00
|
|
|
@$(RM) core *.o *.test tmp* \
|
2016-11-10 13:43:51 +00:00
|
|
|
fullbench-dll$(EXT) fullbench-lib$(EXT) \
|
2016-11-03 14:03:43 +00:00
|
|
|
fullbench$(EXT) fullbench32$(EXT) \
|
|
|
|
fuzzer$(EXT) fuzzer32$(EXT) \
|
|
|
|
frametest$(EXT) frametest32$(EXT) \
|
2016-11-09 01:41:06 +00:00
|
|
|
fasttest$(EXT) datagen$(EXT)
|
2016-11-03 15:01:50 +00:00
|
|
|
@rm -fR $(TESTDIR)
|
2016-11-03 14:03:43 +00:00
|
|
|
@echo Cleaning completed
|
|
|
|
|
2016-11-17 22:54:30 +00:00
|
|
|
.PHONY: versionsTest
|
2016-11-03 15:01:50 +00:00
|
|
|
versionsTest:
|
|
|
|
$(PYTHON) test-lz4-versions.py
|
|
|
|
|
2016-11-03 14:03:43 +00:00
|
|
|
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
#make install is validated only for Linux, OSX, kFreeBSD, Hurd and
|
|
|
|
#FreeBSD targets
|
|
|
|
ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU FreeBSD))
|
|
|
|
|
2016-11-17 21:02:06 +00:00
|
|
|
MD5:=md5sum
|
|
|
|
ifneq (,$(filter $(shell uname), Darwin ))
|
|
|
|
MD5:=md5 -r
|
|
|
|
endif
|
2016-11-03 14:03:43 +00:00
|
|
|
|
2016-11-17 21:02:06 +00:00
|
|
|
test: test-lz4 test-lz4c test-fasttest test-frametest test-fullbench test-fuzzer
|
2016-11-03 14:03:43 +00:00
|
|
|
|
2016-11-17 21:02:06 +00:00
|
|
|
test32: CFLAGS+=-m32
|
|
|
|
test32: test
|
2016-11-03 14:03:43 +00:00
|
|
|
|
|
|
|
test-lz4-sparse: lz4 datagen
|
|
|
|
@echo "\n ---- test sparse file support ----"
|
|
|
|
./datagen -g5M -P100 > tmpSrc
|
2016-11-17 21:02:06 +00:00
|
|
|
$(LZ4) -B4D tmpSrc | $(LZ4) -dv --sparse > tmpB4
|
2016-11-03 14:03:43 +00:00
|
|
|
diff -s tmpSrc tmpB4
|
2016-11-17 21:02:06 +00:00
|
|
|
$(LZ4) -B5D tmpSrc | $(LZ4) -dv --sparse > tmpB5
|
2016-11-03 14:03:43 +00:00
|
|
|
diff -s tmpSrc tmpB5
|
2016-11-17 21:02:06 +00:00
|
|
|
$(LZ4) -B6D tmpSrc | $(LZ4) -dv --sparse > tmpB6
|
2016-11-03 14:03:43 +00:00
|
|
|
diff -s tmpSrc tmpB6
|
2016-11-17 21:02:06 +00:00
|
|
|
$(LZ4) -B7D tmpSrc | $(LZ4) -dv --sparse > tmpB7
|
2016-11-03 14:03:43 +00:00
|
|
|
diff -s tmpSrc tmpB7
|
2016-11-17 21:02:06 +00:00
|
|
|
$(LZ4) tmpSrc | $(LZ4) -dv --no-sparse > tmpNoSparse
|
2016-11-03 14:03:43 +00:00
|
|
|
diff -s tmpSrc tmpNoSparse
|
|
|
|
ls -ls tmp*
|
2016-11-17 21:02:06 +00:00
|
|
|
./datagen -s1 -g1200007 -P100 | $(LZ4) | $(LZ4) -dv --sparse > tmpOdd # Odd size file (to generate non-full last block)
|
2016-11-03 14:03:43 +00:00
|
|
|
./datagen -s1 -g1200007 -P100 | diff -s - tmpOdd
|
|
|
|
ls -ls tmpOdd
|
|
|
|
@$(RM) tmp*
|
|
|
|
@echo "\n Compatibility with Console :"
|
2016-11-17 21:02:06 +00:00
|
|
|
echo "Hello World 1 !" | $(LZ4) | $(LZ4) -d -c
|
|
|
|
echo "Hello World 2 !" | $(LZ4) | $(LZ4) -d | cat
|
|
|
|
echo "Hello World 3 !" | $(LZ4) --no-frame-crc | $(LZ4) -d -c
|
2016-11-03 14:03:43 +00:00
|
|
|
@echo "\n Compatibility with Append :"
|
|
|
|
./datagen -P100 -g1M > tmp1M
|
|
|
|
cat tmp1M tmp1M > tmp2M
|
2016-11-17 21:02:06 +00:00
|
|
|
$(LZ4) -B5 -v tmp1M tmpC
|
|
|
|
$(LZ4) -d -v tmpC tmpR
|
|
|
|
$(LZ4) -d -v tmpC >> tmpR
|
2016-11-03 14:03:43 +00:00
|
|
|
ls -ls tmp*
|
|
|
|
diff tmp2M tmpR
|
|
|
|
@$(RM) tmp*
|
|
|
|
|
|
|
|
test-lz4-contentSize: lz4 datagen
|
|
|
|
@echo "\n ---- test original size support ----"
|
|
|
|
./datagen -g15M > tmp
|
2016-11-17 21:02:06 +00:00
|
|
|
$(LZ4) -v tmp | $(LZ4) -t
|
|
|
|
$(LZ4) -v --content-size tmp | $(LZ4) -d > tmp2
|
2016-11-03 14:03:43 +00:00
|
|
|
diff -s tmp tmp2
|
|
|
|
# test large size [2-4] GB
|
2016-11-17 21:02:06 +00:00
|
|
|
@./datagen -g3G -P100 | $(LZ4) --verbose | $(LZ4) --decompress --force --sparse - tmp
|
2016-11-03 14:03:43 +00:00
|
|
|
@ls -ls tmp
|
2016-11-17 21:02:06 +00:00
|
|
|
@./datagen -g3G -P100 | $(LZ4) --quiet --content-size | $(LZ4) --verbose --decompress --force --sparse - tmp2
|
2016-11-03 14:03:43 +00:00
|
|
|
@ls -ls tmp2
|
2016-11-17 21:02:06 +00:00
|
|
|
diff -s tmp tmp2
|
2016-11-03 14:03:43 +00:00
|
|
|
@$(RM) tmp*
|
|
|
|
|
|
|
|
test-lz4-frame-concatenation: lz4 datagen
|
|
|
|
@echo "\n ---- test frame concatenation ----"
|
|
|
|
@echo -n > empty.test
|
|
|
|
@echo hi > nonempty.test
|
|
|
|
cat nonempty.test empty.test nonempty.test > orig.test
|
2016-11-17 21:02:06 +00:00
|
|
|
@$(LZ4) -zq empty.test > empty.lz4.test
|
|
|
|
@$(LZ4) -zq nonempty.test > nonempty.lz4.test
|
2016-11-03 14:03:43 +00:00
|
|
|
cat nonempty.lz4.test empty.lz4.test nonempty.lz4.test > concat.lz4.test
|
2016-11-17 21:02:06 +00:00
|
|
|
$(LZ4) -d concat.lz4.test > result.test
|
2016-11-03 14:03:43 +00:00
|
|
|
sdiff orig.test result.test
|
|
|
|
@$(RM) *.test
|
|
|
|
@echo frame concatenation test completed
|
|
|
|
|
|
|
|
test-lz4-multiple: lz4 datagen
|
|
|
|
@echo "\n ---- test multiple files ----"
|
|
|
|
@./datagen -s1 > tmp1 2> $(VOID)
|
|
|
|
@./datagen -s2 -g100K > tmp2 2> $(VOID)
|
|
|
|
@./datagen -s3 -g1M > tmp3 2> $(VOID)
|
2016-11-17 21:02:06 +00:00
|
|
|
$(LZ4) -f -m tmp*
|
2016-11-03 14:03:43 +00:00
|
|
|
ls -ls tmp*
|
|
|
|
@$(RM) tmp1 tmp2 tmp3
|
2016-11-17 21:02:06 +00:00
|
|
|
$(LZ4) -df -m *.lz4
|
2016-11-03 14:03:43 +00:00
|
|
|
ls -ls tmp*
|
2016-11-17 21:02:06 +00:00
|
|
|
$(LZ4) -f -m tmp1 notHere tmp2; echo $$?
|
2016-11-03 14:03:43 +00:00
|
|
|
@$(RM) tmp*
|
|
|
|
|
2016-12-07 22:29:22 +00:00
|
|
|
unlz4:
|
2016-12-07 23:52:07 +00:00
|
|
|
@$(MAKE) -C $(PRGDIR) $@ CFLAGS="$(CFLAGS)"
|
2016-12-07 22:29:22 +00:00
|
|
|
|
2016-12-07 22:49:04 +00:00
|
|
|
lz4cat:
|
2016-12-07 23:52:07 +00:00
|
|
|
@$(MAKE) -C $(PRGDIR) $@ CFLAGS="$(CFLAGS)"
|
2016-12-07 22:49:04 +00:00
|
|
|
|
|
|
|
test-lz4-basic: lz4 datagen unlz4 lz4cat
|
2016-11-03 14:03:43 +00:00
|
|
|
@echo "\n ---- test lz4 basic compression/decompression ----"
|
2016-11-17 21:02:06 +00:00
|
|
|
./datagen -g0 | $(LZ4) -v | $(LZ4) -t
|
|
|
|
./datagen -g16KB | $(LZ4) -9 | $(LZ4) -t
|
2016-11-03 14:03:43 +00:00
|
|
|
./datagen -g20KB > tmpSrc
|
2016-12-07 22:29:22 +00:00
|
|
|
$(LZ4) < tmpSrc | $(LZ4) -d > tmpRes
|
2016-11-03 14:03:43 +00:00
|
|
|
diff -q tmpSrc tmpRes
|
2016-11-17 21:02:06 +00:00
|
|
|
$(LZ4) --no-frame-crc < tmpSrc | $(LZ4) -d > tmpRes
|
2016-11-03 14:03:43 +00:00
|
|
|
diff -q tmpSrc tmpRes
|
2016-11-17 21:02:06 +00:00
|
|
|
./datagen | $(LZ4) | $(LZ4) -t
|
|
|
|
./datagen -g6M -P99 | $(LZ4) -9BD | $(LZ4) -t
|
|
|
|
./datagen -g17M | $(LZ4) -9v | $(LZ4) -qt
|
|
|
|
./datagen -g33M | $(LZ4) --no-frame-crc | $(LZ4) -t
|
|
|
|
./datagen -g256MB | $(LZ4) -vqB4D | $(LZ4) -t
|
2016-12-07 22:29:22 +00:00
|
|
|
@echo "hello world" > tmp
|
2016-12-07 22:49:04 +00:00
|
|
|
$(LZ4) --rm -f tmp
|
2016-12-07 22:29:22 +00:00
|
|
|
ls -ls tmp && false || true # must fail (--rm)
|
|
|
|
ls -ls tmp.lz4
|
2016-12-07 22:49:04 +00:00
|
|
|
$(PRGDIR)/lz4cat tmp.lz4 # must display hello world
|
|
|
|
ls -ls tmp.lz4
|
2016-12-07 22:29:22 +00:00
|
|
|
$(PRGDIR)/unlz4 --rm tmp.lz4
|
|
|
|
ls -ls tmp
|
|
|
|
ls -ls tmp.lz4 && false || true # must fail (--rm)
|
|
|
|
ls -ls tmp.lz4.lz4 && false || true # must fail (unlz4)
|
2016-12-07 22:49:04 +00:00
|
|
|
$(PRGDIR)/lz4cat tmp # pass-through mode
|
|
|
|
ls -ls tmp
|
|
|
|
ls -ls tmp.lz4 && false || true # must fail (lz4cat)
|
2016-11-09 22:36:42 +00:00
|
|
|
@$(RM) tmp*
|
|
|
|
|
|
|
|
test-lz4-hugefile: lz4 datagen
|
|
|
|
@echo "\n ---- test huge files compression/decompression ----"
|
2016-11-17 21:02:06 +00:00
|
|
|
./datagen -g6GB | $(LZ4) -vB5D | $(LZ4) -qt
|
|
|
|
./datagen -g6GB | $(LZ4) -v5BD | $(LZ4) -qt
|
2016-11-03 14:03:43 +00:00
|
|
|
@$(RM) tmp*
|
|
|
|
|
2016-11-09 22:36:42 +00:00
|
|
|
test-lz4-testmode: lz4 datagen
|
2016-11-09 23:04:55 +00:00
|
|
|
@echo "\n ---- bench mode ----"
|
2016-11-17 21:02:06 +00:00
|
|
|
$(LZ4) -bi1
|
2016-11-09 23:04:55 +00:00
|
|
|
@echo "\n ---- test mode ----"
|
2016-11-17 21:02:06 +00:00
|
|
|
./datagen | $(LZ4) -t && false || true
|
|
|
|
./datagen | $(LZ4) -tf && false || true
|
2016-11-09 23:04:55 +00:00
|
|
|
@echo "\n ---- pass-through mode ----"
|
2016-11-17 21:02:06 +00:00
|
|
|
./datagen | $(LZ4) -d > $(VOID) && false || true
|
|
|
|
./datagen | $(LZ4) -df > $(VOID)
|
2016-11-09 22:36:42 +00:00
|
|
|
@echo "Hello World !" > tmp1
|
2016-11-17 21:02:06 +00:00
|
|
|
$(LZ4) -dcf tmp1
|
2016-11-10 00:37:16 +00:00
|
|
|
@echo "from underground..." > tmp2
|
2016-11-17 21:02:06 +00:00
|
|
|
$(LZ4) -dcfm tmp1 tmp2
|
2016-11-04 18:58:10 +00:00
|
|
|
@echo "\n ---- test cli ----"
|
2016-11-17 21:02:06 +00:00
|
|
|
$(LZ4) file-does-not-exist && false || true
|
|
|
|
$(LZ4) -f file-does-not-exist && false || true
|
|
|
|
$(LZ4) -fm file1-dne file2-dne && false || true
|
|
|
|
$(LZ4) -fm file1-dne file2-dne && false || true
|
2016-11-03 14:03:43 +00:00
|
|
|
|
2016-11-09 22:36:42 +00:00
|
|
|
test-lz4: lz4 datagen test-lz4-basic test-lz4-multiple test-lz4-sparse \
|
|
|
|
test-lz4-frame-concatenation test-lz4-testmode test-lz4-contentSize \
|
|
|
|
test-lz4-hugefile
|
|
|
|
|
2016-11-03 14:03:43 +00:00
|
|
|
test-lz4c: lz4c datagen
|
|
|
|
@echo "\n ---- test lz4c version ----"
|
2016-11-17 21:02:06 +00:00
|
|
|
./datagen -g256MB | $(LZ4)c -l -v | $(LZ4)c -t
|
|
|
|
|
|
|
|
test-lz4c32: CFLAGS+=-m32
|
|
|
|
test-lz4c32: test-lz4
|
2016-11-03 14:03:43 +00:00
|
|
|
|
|
|
|
test-interop-32-64: lz4 lz4c32 datagen
|
|
|
|
@echo "\n ---- test interoperability 32-bits -vs- 64 bits ----"
|
2016-11-17 21:02:06 +00:00
|
|
|
./datagen -g16KB | $(LZ4)c32 -9 | $(LZ4) -t
|
|
|
|
./datagen -P10 | $(LZ4) -9B4 | $(LZ4)c32 -t
|
|
|
|
./datagen | $(LZ4)c32 | $(LZ4) -t
|
|
|
|
./datagen -g1M | $(LZ4) -3B5 | $(LZ4)c32 -t
|
|
|
|
./datagen -g256MB | $(LZ4)c32 -vqB4D | $(LZ4) -qt
|
|
|
|
./datagen -g1G -P90 | $(LZ4) | $(LZ4)c32 -t
|
|
|
|
./datagen -g6GB | $(LZ4)c32 -vq9BD | $(LZ4) -qt
|
2016-11-03 14:03:43 +00:00
|
|
|
|
|
|
|
test-lz4c32-basic: lz4c32 datagen
|
|
|
|
@echo "\n ---- test lz4c32 32-bits version ----"
|
2016-11-17 21:02:06 +00:00
|
|
|
./datagen -g16KB | $(LZ4)c32 -9 | $(LZ4)c32 -t
|
|
|
|
./datagen | $(LZ4)c32 | $(LZ4)c32 -t
|
|
|
|
./datagen -g256MB | $(LZ4)c32 -vqB4D | $(LZ4)c32 -qt
|
|
|
|
./datagen -g6GB | $(LZ4)c32 -vqB5D | $(LZ4)c32 -qt
|
2016-11-03 14:03:43 +00:00
|
|
|
|
2016-11-08 09:43:18 +00:00
|
|
|
test-platform:
|
|
|
|
@echo "\n ---- test lz4 $(QEMU_SYS) platform ----"
|
2016-11-17 21:02:06 +00:00
|
|
|
$(QEMU_SYS) ./datagen -g16KB | $(QEMU_SYS) $(LZ4) -9 | $(QEMU_SYS) $(LZ4) -t
|
|
|
|
$(QEMU_SYS) ./datagen | $(QEMU_SYS) $(LZ4) | $(QEMU_SYS) $(LZ4) -t
|
|
|
|
$(QEMU_SYS) ./datagen -g256MB | $(QEMU_SYS) $(LZ4) -vqB4D | $(QEMU_SYS) $(LZ4) -qt
|
2016-11-08 11:33:01 +00:00
|
|
|
ifneq ($(QEMU_SYS),qemu-arm-static)
|
2016-11-17 21:02:06 +00:00
|
|
|
$(QEMU_SYS) ./datagen -g3GB | $(QEMU_SYS) $(LZ4) -vqB5D | $(QEMU_SYS) $(LZ4) -qt
|
2016-11-08 11:33:01 +00:00
|
|
|
endif
|
2016-11-08 09:43:18 +00:00
|
|
|
|
2016-11-03 14:03:43 +00:00
|
|
|
test-fullbench: fullbench
|
|
|
|
./fullbench --no-prompt $(NB_LOOPS) $(TEST_FILES)
|
|
|
|
|
2016-11-17 21:02:06 +00:00
|
|
|
test-fullbench32: CFLAGS += -m32
|
|
|
|
test-fullbench32: test-fullbench
|
2016-11-03 14:03:43 +00:00
|
|
|
|
|
|
|
test-fuzzer: fuzzer
|
|
|
|
./fuzzer $(FUZZER_TIME)
|
|
|
|
|
2016-11-17 21:02:06 +00:00
|
|
|
test-fuzzer32: CFLAGS += -m32
|
|
|
|
test-fuzzer32: test-fuzzer
|
2016-11-03 14:03:43 +00:00
|
|
|
|
|
|
|
test-frametest: frametest
|
|
|
|
./frametest $(FUZZER_TIME)
|
|
|
|
|
2016-11-17 21:02:06 +00:00
|
|
|
test-frametest32: CFLAGS += -m32
|
|
|
|
test-frametest32: test-frametest
|
2016-11-03 14:03:43 +00:00
|
|
|
|
2016-11-05 02:59:50 +00:00
|
|
|
test-fasttest: fasttest
|
|
|
|
./fasttest
|
|
|
|
|
2016-11-03 14:03:43 +00:00
|
|
|
test-mem: lz4 datagen fuzzer frametest fullbench
|
|
|
|
@echo "\n ---- valgrind tests : memory analyzer ----"
|
|
|
|
valgrind --leak-check=yes --error-exitcode=1 ./datagen -g50M > $(VOID)
|
|
|
|
./datagen -g16KB > tmp
|
2016-11-17 21:02:06 +00:00
|
|
|
valgrind --leak-check=yes --error-exitcode=1 $(LZ4) -9 -BD -f tmp $(VOID)
|
2016-11-03 14:03:43 +00:00
|
|
|
./datagen -g16KB -s2 > tmp2
|
|
|
|
./datagen -g16KB -s3 > tmp3
|
2016-11-17 21:02:06 +00:00
|
|
|
valgrind --leak-check=yes --error-exitcode=1 $(LZ4) --force --multiple tmp tmp2 tmp3
|
2016-11-03 14:03:43 +00:00
|
|
|
./datagen -g16MB > tmp
|
2016-11-17 21:02:06 +00:00
|
|
|
valgrind --leak-check=yes --error-exitcode=1 $(LZ4) -9 -B5D -f tmp tmp2
|
|
|
|
valgrind --leak-check=yes --error-exitcode=1 $(LZ4) -t tmp2
|
|
|
|
valgrind --leak-check=yes --error-exitcode=1 $(LZ4) -bi1 tmp
|
2016-11-03 14:03:43 +00:00
|
|
|
valgrind --leak-check=yes --error-exitcode=1 ./fullbench -i1 tmp tmp2
|
|
|
|
./datagen -g256MB > tmp
|
2016-11-17 21:02:06 +00:00
|
|
|
valgrind --leak-check=yes --error-exitcode=1 $(LZ4) -B4D -f -vq tmp $(VOID)
|
2016-11-03 14:03:43 +00:00
|
|
|
$(RM) tmp*
|
|
|
|
valgrind --leak-check=yes --error-exitcode=1 ./fuzzer -i64 -t1
|
|
|
|
valgrind --leak-check=yes --error-exitcode=1 ./frametest -i256
|
|
|
|
|
|
|
|
test-mem32: lz4c32 datagen
|
|
|
|
# unfortunately, valgrind doesn't seem to work with non-native binary...
|
|
|
|
|
|
|
|
endif
|