aboutsummaryrefslogtreecommitdiffstats
path: root/test/compression
diff options
context:
space:
mode:
Diffstat (limited to 'test/compression')
-rw-r--r--test/compression/Makefile14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/compression/Makefile b/test/compression/Makefile
index e8f3cf4d..ff7032d5 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; \