From 2a3f4b2378c14865bc2f6ad76f21ae6444c833c8 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Fri, 13 Sep 2019 16:11:03 +0200 Subject: Scaling down compression tests --- test/compression/Makefile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'test/compression') diff --git a/test/compression/Makefile b/test/compression/Makefile index 2e14e646..48521b14 100644 --- a/test/compression/Makefile +++ b/test/compression/Makefile @@ -1,5 +1,7 @@ include ../../Makefile.config +SIMU=timeout --signal=SIGKILL 20s $(EXECUTE) + CC=../../ccomp CFLAGS=$(CCOMPOPTS) -U__GNUC__ -stdlib ../../runtime -dclight -dasm LIBS= @@ -30,15 +32,19 @@ TESTFILE:=$(firstword $(wildcard /usr/share/dict/words) ./lzss) TESTCOMPR=/tmp/testcompr.$$$$ TESTEXPND=/tmp/testexpnd.$$$$ +LIGHTERFILEPRE:=/tmp/lighter +LIGHTERFILE:=$(LIGHTERFILEPRE)aa + test: - @rm -f $(TESTCOMPR) $(TESTEXPND); \ - echo "Test data: $(TESTFILE)"; \ + @split -l15 $(TESTFILE) $(LIGHTERFILEPRE); \ + rm -f $(TESTCOMPR) $(TESTEXPND); \ + echo "Test data: $(LIGHTERFILE)"; \ for i in $(EXE); do \ echo "$$i: compression..."; \ - $(SIMU) ./$$i -c -i $(TESTFILE) -o $(TESTCOMPR); \ + $(SIMU) ./$$i -c -i $(LIGHTERFILE) -o $(TESTCOMPR); \ echo "$$i: decompression..."; \ $(SIMU) ./$$i -d -i $(TESTCOMPR) -o $(TESTEXPND); \ - if cmp $(TESTFILE) $(TESTEXPND); \ + if cmp $(LIGHTERFILE) $(TESTEXPND); \ then echo "$$i: passed"; \ else echo "$$i: FAILED"; exit 2; \ fi; \ @@ -49,7 +55,7 @@ bench: @rm -f $(TESTCOMPR) @for i in $(EXE); do \ echo -n "$$i: "; \ - $(TIME) sh -c "./$$i -c -i $(TESTFILE) -o $(TESTCOMPR) && ./$$i -d -i $(TESTCOMPR) -o /dev/null"; \ + $(TIME) sh -c "./$$i -c -i $(LIGHTERFILE) -o $(TESTCOMPR) && ./$$i -d -i $(TESTCOMPR) -o /dev/null"; \ done @rm -f $(TESTCOMPR) -- cgit