From bd2c0f67e1f9e4b90d3020d004bd8d8d6655e88c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Fri, 5 Jul 2019 11:48:02 +0100 Subject: tests/tcg: fix up test-i386-fprem.ref generation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We never shipped the reference data in the source tree because it's quite big (64M). As a result the only option is to generate it locally. Although we have a rule to generate the reference file we missed the dependency and location changes, probably because it's only run for SLOW test runs. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- tests/tcg/i386/Makefile.target | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target index b4033ba..d0eb702 100644 --- a/tests/tcg/i386/Makefile.target +++ b/tests/tcg/i386/Makefile.target @@ -35,9 +35,9 @@ test-i386-fprem.ref: test-i386-fprem $(call quiet-command, ./$< > $@,"GENREF","generating $@") run-test-i386-fprem: TIMEOUT=60 -run-test-i386-fprem: test-i386-fprem +run-test-i386-fprem: test-i386-fprem test-i386-fprem.ref $(call run-test,test-i386-fprem, $(QEMU) $<,"$< on $(TARGET_NAME)") - $(call diff-out,test-i386-fprem, $(I386_SRC)/$<.ref) + $(call diff-out,test-i386-fprem, test-i386-fprem.ref) else run-test-i386-fprem: test-i386-fprem $(call skip-test, $<, "SLOW") -- cgit v1.1 From ef860047b61ea4a5ad407496ab8cda6370a2d7d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Fri, 5 Jul 2019 12:56:35 +0100 Subject: tests/tcg: fix diff-out pass to properly report failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A side effect of piping the output to head is squash the exit status of the diff command. Fix this by only doing the pipe if the diff failed and then ensuring the status is non-zero. Signed-off-by: Alex Bennée --- tests/tcg/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile index 6fa63cc..9f56768 100644 --- a/tests/tcg/Makefile +++ b/tests/tcg/Makefile @@ -45,7 +45,11 @@ run-test = $(call quiet-command, timeout $(TIMEOUT) $2,"TEST",$3) endif # $1 = test name, $2 = reference -diff-out = $(call quiet-command, diff -u $1.out $2 | head -n 10,"DIFF","$1.out with $2") +# to work around the pipe squashing the status we only pipe the result if +# we know it failed and then force failure at the end. +diff-out = $(call quiet-command, diff -q $1.out $2 || \ + (diff -u $1.out $2 | head -n 10 && false), \ + "DIFF","$1.out with $2") # $1 = test name, $2 = reason skip-test = @printf " SKIPPED %s on $(TARGET_NAME) because %s\n" $1 $2 -- cgit v1.1