From 545ad6691ad48e9af3a0dd6e2d34fccfd8d0ad29 Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Tue, 18 Sep 2018 20:17:46 +0000 Subject: [PATCH] Do not use outdated *-mod.gb file The regression test wrapper scripts perform a conditional copy of the goto binary, which is meant to cover the case that an invocation of goto-instrument does not generate a goto binary. When regression tests are re-run without an intermittent "clean", the conditional copy was not performed. This may lead to spurious test failures when goto binary versions change. --- regression/contracts/chain.sh | 1 + regression/goto-instrument/chain.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/regression/contracts/chain.sh b/regression/contracts/chain.sh index 2656ea4488f..a22dc195bdc 100755 --- a/regression/contracts/chain.sh +++ b/regression/contracts/chain.sh @@ -19,6 +19,7 @@ else $goto_cc -o "${name}.gb" "${name}.c" fi +rm -f "${name}-mod.gb" $goto_instrument ${args} "${name}.gb" "${name}-mod.gb" if [ ! -e "${name}-mod.gb" ] ; then cp "$name.gb" "${name}-mod.gb" diff --git a/regression/goto-instrument/chain.sh b/regression/goto-instrument/chain.sh index 2656ea4488f..a22dc195bdc 100755 --- a/regression/goto-instrument/chain.sh +++ b/regression/goto-instrument/chain.sh @@ -19,6 +19,7 @@ else $goto_cc -o "${name}.gb" "${name}.c" fi +rm -f "${name}-mod.gb" $goto_instrument ${args} "${name}.gb" "${name}-mod.gb" if [ ! -e "${name}-mod.gb" ] ; then cp "$name.gb" "${name}-mod.gb"