diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-04-20 14:06:21 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-04-20 14:06:21 +0200 |
commit | 168393089024b5f926836cb813fddf14e6b6e4d4 (patch) | |
tree | 5d018198dc26be847544f162b87ad3dcecbab479 /test/c/Makefile | |
parent | 633b72565b022f159526338b5bbb9fcac86dfd2b (diff) | |
parent | b3431b1d9ee5121883d307cff0b62b7e53369891 (diff) | |
download | compcert-kvx-168393089024b5f926836cb813fddf14e6b6e4d4.tar.gz compcert-kvx-168393089024b5f926836cb813fddf14e6b6e4d4.zip |
Merge remote-tracking branch 'origin/mppa-work' into mppa-fast-div
(unfinished)
Diffstat (limited to 'test/c/Makefile')
-rw-r--r-- | test/c/Makefile | 55 |
1 files changed, 32 insertions, 23 deletions
diff --git a/test/c/Makefile b/test/c/Makefile index 46670ec6..a2a80e06 100644 --- a/test/c/Makefile +++ b/test/c/Makefile @@ -3,18 +3,32 @@ include ../../Makefile.config CCOMP=../../ccomp CCOMPFLAGS=$(CCOMPOPTS) -stdlib ../../runtime -dc -dclight -dasm -CFLAGS=-O1 -Wall +CFLAGS+=-O2 -Wall +EXECUTE:=timeout --signal=SIGTERM 20s $(EXECUTE) LIBS=$(LIBMATH) -TIME=xtime -o /dev/null -mintime 2.0 # Xavier's hack -#TIME=time >/dev/null # Otherwise - -PROGS=fib qsort fftw sha1 sha3 aes \ - lists binarytrees fannkuch \ - nsieve nsievebits vmach \ - chomp perlin siphash24\ - integr fft fftsp almabench knucleotide mandelbrot nbody spectral bisect +TIME=time >/dev/null +# FIXME - maybe this is better? From v3.6 +# TIME=ocaml unix.cma ../../tools/xtime.ml -o /dev/null -mintime 2.0 -minruns 4 + +PROGS?=fib integr qsort fft fftsp fftw sha1 sha3 aes almabench \ + lists binarytrees fannkuch mandelbrot nbody \ + nsieve nsievebits spectral vmach \ + chomp perlin siphash24 + +## +# Kalray NOTE : +# * removed knucleotide from PROGS, it is hard to edit the input +# to modify its size without resulting in a seg fault, and the base input +# takes a too long time to complete in the simulator. +# * also removed bisect, who is exhibiting different float values on the Kalray +# architecture than using x86 GCC (for both CompCert and GCC ports) (tested with n=10) +## +ifeq ($(ARCH),mppa_k1c) + PROGS:=$(filter-out knucleotide,$(PROGS)) + PROGS:=$(filter-out bisect,$(PROGS)) +endif all: $(PROGS:%=%.compcert) @@ -31,32 +45,27 @@ all_gcc: $(PROGS:%=%.gcc) %.gcc: %.c $(CC) $(CFLAGS) -o $*.gcc $*.c $(LIBS) -test: +test: all @for i in $(PROGS); do \ - if $(SIMU) ./$$i.compcert | cmp -s - Results/$$i; \ - then echo "$$i: passed"; \ - else echo "$$i: FAILED"; exit 2; \ - fi; \ + SIMU='$(EXECUTE)' ./Runtest $$i ./$$i.compcert;\ done -test_gcc: +test_gcc: all_gcc @for i in $(PROGS); do \ - if ./$$i.gcc | cmp -s - Results/$$i; \ - then echo "$$i: passed"; \ - else echo "$$i: FAILED"; \ - fi; \ + SIMU='$(EXECUTE)' ./Runtest $$i ./$$i.gcc;\ done -bench_gcc: +bench_gcc: all_gcc @for i in $(PROGS); do \ - echo -n "$$i: "; $(TIME) ./$$i.gcc; \ + $(TIME) -name $$i -- ./$$i.gcc; \ done -bench: +bench: all @for i in $(PROGS); do \ - echo -n "$$i: "; $(TIME) ./$$i.compcert; \ + $(TIME) -name $$i -- ./$$i.compcert; \ done clean: rm -f *.compcert *.gcc rm -f *.compcert.c *.light.c *.parsed.c *.s *.o *.sdump *~ + rm -f *.out |