From 04941b3cb8712cee9c3b0806cfe7aa76287c40e8 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Sun, 24 Jul 2016 16:09:47 +0200 Subject: Updates to the local test suite - Adjust parameters to bring the running time of each test closer to 1 second - compression/arcode.c: array access one past - "inline" -> "static inline" - Remove cchecklink support --- test/compression/Makefile | 22 +++++----------------- test/compression/arcode.c | 2 +- 2 files changed, 6 insertions(+), 18 deletions(-) (limited to 'test/compression') diff --git a/test/compression/Makefile b/test/compression/Makefile index d951c08f..784f7e73 100644 --- a/test/compression/Makefile +++ b/test/compression/Makefile @@ -4,10 +4,6 @@ CC=../../ccomp CFLAGS=-U__GNUC__ -stdlib ../../runtime -dclight -dasm LIBS= TIME=xtime -o /dev/null -mintime 1.0 -ifeq ($(CCHECKLINK),true) -CCHECK=../../cchecklink -CFLAGS+= -sdump -endif EXE=arcode lzw lzss @@ -35,7 +31,7 @@ TESTCOMPR=/tmp/testcompr.out TESTEXPND=/tmp/testexpnd.out test: - rm -f $(TESTCOMPR) $(TESTEXPND) + @rm -f $(TESTCOMPR) $(TESTEXPND) @echo "Test data: $(TESTFILE)" @for i in $(EXE); do \ echo "$$i: compression..."; \ @@ -47,23 +43,15 @@ test: else echo "$$i: FAILED"; exit 2; \ fi; \ done - rm -f $(TESTCOMPR) $(TESTEXPND) + @rm -f $(TESTCOMPR) $(TESTEXPND) bench: - rm -f $(TESTCOMPR) + @rm -f $(TESTCOMPR) @for i in $(EXE); do \ - echo -n "$$i "; \ + echo -n "$$i: "; \ $(TIME) sh -c "./$$i -c -i $(TESTFILE) -o $(TESTCOMPR) && ./$$i -d -i $(TESTCOMPR) -o /dev/null"; \ done - rm -f $(TESTCOMPR) - -ccheck: - @echo "---- arcode" - @$(CCHECK) -exe arcode $(ARCODE_OBJS:.o=.sdump) - @echo "---- lzw" - @$(CCHECK) -exe lzw $(LZW_OBJS:.o=.sdump) - @echo "---- lzss" - @$(CCHECK) -exe lzss $(LZSS_OBJS:.o=.sdump) + @rm -f $(TESTCOMPR) include .depend diff --git a/test/compression/arcode.c b/test/compression/arcode.c index f915cc25..9a9847f8 100644 --- a/test/compression/arcode.c +++ b/test/compression/arcode.c @@ -702,7 +702,7 @@ int ReadHeader(bit_file_t *bfpIn) cumulativeProb = 0; - for (c = 0; c <= UPPER(EOF_CHAR); c++) + for (c = 0; c < UPPER(EOF_CHAR); c++) { ranges[UPPER(c)] = 0; } -- cgit