summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJennifer Liu <jenniferliu620@fb.com>2018-06-26 01:51:47 (GMT)
committerJennifer Liu <jenniferliu620@fb.com>2018-06-26 01:51:47 (GMT)
commit17bcb58eb0ca737c4d567159563ce950a0aef890 (patch)
tree03b2575d8d305b40ceef1ed81fb55caad9e6b52b
parent536b79afd916d65c472a7157390ef621ee967771 (diff)
downloadlz4-17bcb58eb0ca737c4d567159563ce950a0aef890.zip
lz4-17bcb58eb0ca737c4d567159563ce950a0aef890.tar.gz
lz4-17bcb58eb0ca737c4d567159563ce950a0aef890.tar.bz2
Fixed bug about file to be compressed is not present
-rw-r--r--.circleci/config.yml52
-rw-r--r--tests/Makefile7
2 files changed, 42 insertions, 17 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 65e6c33..1602e49 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -1,13 +1,39 @@
-version: 2
-jobs:
- build:
- docker:
- - image: debian:stretch
- steps:
- - checkout
- - run:
- name: Greeting
- command: echo Hello, world.
- - run:
- name: Print the Current Time
- command: date
+dependencies:
+ override:
+ - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; sudo apt-get -y -qq update
+ - sudo apt-get -y install qemu-system-ppc qemu-user-static gcc-powerpc-linux-gnu
+ - sudo apt-get -y install qemu-system-arm gcc-arm-linux-gnueabi libc6-dev-armel-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross
+ - sudo apt-get -y install libc6-dev-i386 clang gcc-5 gcc-5-multilib gcc-6 valgrind
+
+test:
+ override:
+ # Tests compilers and C standards
+ - clang -v; make clangtest && make clean
+ - g++ -v; make gpptest && make clean
+ - gcc -v; make c_standards && make clean
+ - gcc -v; g++ -v; make ctocpptest && make clean
+ - gcc-5 -v; CC=gcc-5 CFLAGS="-O2 -Werror" make check && make clean
+ - gcc-5 -v; CC=gcc-5 CFLAGS="-O2 -m32 -Werror" CPPFLAGS=-I/usr/include/x86_64-linux-gnu make check && make clean
+ - gcc-6 -v; CC=gcc-6 make c_standards && make clean
+ - gcc-6 -v; CC=gcc-6 MOREFLAGS="-O2 -Werror" make check && make clean
+# Shorter tests
+ - make cmake && make clean
+ - make -C tests test-lz4
+ - make -C tests test-lz4c
+ - make -C tests test-frametest
+ - make -C tests test-fullbench
+ - make -C tests test-fuzzer && make clean
+ - make -C lib all && make clean
+ - pyenv global 3.4.4; make versionsTest MOREFLAGS=-I/usr/include/x86_64-linux-gnu && make clean
+ - make travis-install && make clean
+ # Longer tests
+ - gcc -v; CFLAGS="-O2 -m32 -Werror" CPPFLAGS=-I/usr/include/x86_64-linux-gnu make check && make clean
+ - make usan && make clean
+ - clang -v; make staticAnalyze && make clean
+ # Valgrind tests
+ - make -C tests test-mem && make clean
+ # ARM, AArch64, PowerPC, PowerPC64 tests
+ - make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static && make clean
+ - make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static MOREFLAGS=-m64 && make clean
+ - make platformTest CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static && make clean
+ - make platformTest CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static && make clean
diff --git a/tests/Makefile b/tests/Makefile
index a133df1..0eba02d 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -262,10 +262,9 @@ test-lz4-basic: lz4 datagen unlz4 lz4cat
cat tmp-tlb-hw >> tmp-tlb-hw.lz4
$(LZ4) -f tmp-tlb-hw.lz4 # uncompress valid frame followed by invalid data
$(LZ4) -BX tmp-tlb-hw -c -q | $(LZ4) -tv # test block checksum
- ./datagen -g256KB > tmp-tlb-dg256k
- test "$(shell lz4 -c --fast tmp-tlb-dg256k| wc -c)" -lt "$(shell lz4 -c --fast=9 tmp-tlb-dg256k| wc -c)"
- test "$(shell lz4 -c --fast=1 tmp-tlb-dg256k| wc -c)" -eq "$(shell lz4 -c --fast tmp-tlb-dg256k| wc -c)"
- test "$(shell lz4 -c -9 tmp-tlb-dg256k| wc -c)" -lt "$(shell lz4 -c --fast=1 tmp-tlb-dg256k| wc -c)"
+ test "$(shell ./datagen -g20KB | lz4 -c --fast | wc -c)" -lt "$(shell ./datagen -g20KB | lz4 -c --fast=9 | wc -c)" # compressed size of compression level -1 should be lower than -9
+ test "$(shell ./datagen -g20KB | lz4 -c --fast=1 | wc -c)" -eq "$(shell ./datagen -g20KB| lz4 -c --fast| wc -c)" # checks default fast compression is -1
+ test "$(shell ./datagen -g20KB | lz4 -c -9 | wc -c)" -lt "$(shell ./datagen -g20KB| lz4 -c --fast=1 | wc -c)" # compressed size of compression level 9 should be lower than -1
@$(RM) tmp-tlb*