From eab126143783256e66f9548eb8fd022fa572c96e Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Thu, 5 Nov 2009 21:22:12 +0100 Subject: [PATCH] Fix ltlcounter.test for VPATH builds and n > 2. * src/tgbatest/defs.in (srcdir): Adjust from VPATH builds. * src/tgbatest/ltlcounter.test (lcdir): Adjust definition to new value of $srcdir. (run): Fix setting of $run after $n = 2. Using run=: would in fact disable all the big tests... --- ChangeLog | 10 ++++++++++ src/tgbatest/defs.in | 9 +++++++++ src/tgbatest/ltlcounter.test | 22 +++++++++++----------- 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index cdb33c9b7..452509826 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-11-05 Alexandre Duret-Lutz + + Fix ltlcounter.test for VPATH builds and n > 2. + + * src/tgbatest/defs.in (srcdir): Adjust from VPATH builds. + * src/tgbatest/ltlcounter.test (lcdir): Adjust definition to + new value of $srcdir. + (run): Fix setting of $run after $n = 2. Using run=: would in + fact disable all the big tests... + 2009-11-05 Alexandre Duret-Lutz * src/tgbatest/ltlcounter.test (run): Only construct small diff --git a/src/tgbatest/defs.in b/src/tgbatest/defs.in index aff453e9c..c70a8b026 100644 --- a/src/tgbatest/defs.in +++ b/src/tgbatest/defs.in @@ -49,6 +49,15 @@ rm -rf $testSubDir > /dev/null 2>&1 mkdir $testSubDir cd $testSubDir +# Adjust srcdir now that we are in a subdirectory. We still want to +# source directory corresponding to the build directory that contains +# $testSubDir. +case $srcdir in + # I + [\\/$]* | ?:[\\/]* );; + *) srcdir=../$srcdir +esac + DOT='@DOT@' top_builddir='../@top_builddir@' LBTT="@LBTT@" diff --git a/src/tgbatest/ltlcounter.test b/src/tgbatest/ltlcounter.test index cd2583ec0..f00e937a4 100755 --- a/src/tgbatest/ltlcounter.test +++ b/src/tgbatest/ltlcounter.test @@ -25,7 +25,7 @@ set -e -lcdir=$srcdir/../ltlcounter +lcdir=$srcdir/ltlcounter lc=$lcdir/LTLcounter.pl lcl=$lcdir/LTLcounterLinear.pl lcc=$lcdir/LTLcounterCarry.pl @@ -50,21 +50,21 @@ check_formula() # so the translation of the formula stopped midway, on a formula it # thought it had already seen. -for i in 1 2 3 4 5 6 7 8 9 10 11 12 +for n in 1 2 3 4 5 6 7 8 9 10 11 12 do - :;:;: "========== $i counters ==========" ;:;: # only visible with "set -x" - f=`"$lc" $i` + :;:;: "========== $n counters ==========" ;:;: # only visible with "set -x" + f=`"$lc" $n` check_formula "$f" - f=`"$lcl" $i` + f=`"$lcl" $n` check_formula "$f" - f=`"$lcc" $i` + f=`"$lcc" $n` check_formula "$f" - f=`"$lccl" $i` + f=`"$lccl" $n` check_formula "$f" - - # Only run the first two formulae under valgrind, + + # Only run the first two formulae under valgrind, # it is too slow otherwise. - if test $i = 2; then - run=: + if test $n = 2; then + run= fi done