From 3c72ae21ae10f3f3f379cc45ef145bc7d90feed7 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Wed, 27 Feb 2019 12:06:09 +0100 Subject: Changing the way floats are compared (script using reltol and abstol comparison) --- test/mppa/instr/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/mppa/instr/Makefile') diff --git a/test/mppa/instr/Makefile b/test/mppa/instr/Makefile index b4abb6a4..ea86114c 100644 --- a/test/mppa/instr/Makefile +++ b/test/mppa/instr/Makefile @@ -5,6 +5,7 @@ OPTIM ?= -O2 CFLAGS ?= $(OPTIM) SIMU ?= k1-mppa TIMEOUT ?= --signal=SIGTERM 120s +DIFF ?= python2.7 floatcmp.py -reltol .00001 DIR=./ SRCDIR=$(DIR) @@ -50,7 +51,7 @@ test: $(X86_GCC_OUT) $(GCC_OUT) @for test in $(TESTNAMES); do\ x86out=$(OUTDIR)/$$test.x86-gcc.out;\ gccout=$(OUTDIR)/$$test.gcc.out;\ - if diff -q $$x86out $$gccout > /dev/null; test $${PIPESTATUS[0]} -ne 0; then\ + if $(DIFF) $$x86out $$gccout > /dev/null; test $${PIPESTATUS[0]} -ne 0; then\ >&2 printf "$(RED)ERROR: $$x86out and $$gccout differ$(NC)\n";\ else\ printf "$(GREEN)GOOD: $$x86out and $$gccout concur$(NC)\n";\ @@ -63,7 +64,7 @@ check: $(GCC_OUT) $(CCOMP_OUT) @for test in $(TESTNAMES); do\ gccout=$(OUTDIR)/$$test.gcc.out;\ ccompout=$(OUTDIR)/$$test.ccomp.out;\ - if diff -q $$ccompout $$gccout > /dev/null; test $${PIPESTATUS[0]} -ne 0; then\ + if $(DIFF) $$ccompout $$gccout > /dev/null; test $${PIPESTATUS[0]} -ne 0; then\ >&2 printf "$(RED)ERROR: $$ccompout and $$gccout differ$(NC)\n";\ else\ printf "$(GREEN)GOOD: $$ccompout and $$gccout concur$(NC)\n";\ -- cgit