diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2016-07-24 16:09:47 +0200 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2016-07-24 16:09:47 +0200 |
commit | 04941b3cb8712cee9c3b0806cfe7aa76287c40e8 (patch) | |
tree | 54f8cb441d348c3c06821ff288086d2cde19c9a2 /test/compression | |
parent | 8a9bb1e699d62a8b5c88a54440ee2149acf7021a (diff) | |
download | compcert-kvx-04941b3cb8712cee9c3b0806cfe7aa76287c40e8.tar.gz compcert-kvx-04941b3cb8712cee9c3b0806cfe7aa76287c40e8.zip |
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
Diffstat (limited to 'test/compression')
-rw-r--r-- | test/compression/Makefile | 22 | ||||
-rw-r--r-- | test/compression/arcode.c | 2 |
2 files changed, 6 insertions, 18 deletions
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; } |