X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fexpressions%2Fexpressions.sh;h=b21fb8e1f492fac76cc57a9e496953a8258a0825;hb=009350385d97d9fba2b33ea68cfe8b1aeebf1529;hp=b4850d7ebdc07eaac3b4123edaed7c6bd6662962;hpb=ece7245b6bf64b2d3d8a50472d18bbe176c982d4;p=pspp-builds.git diff --git a/tests/expressions/expressions.sh b/tests/expressions/expressions.sh index b4850d7e..b21fb8e1 100755 --- a/tests/expressions/expressions.sh +++ b/tests/expressions/expressions.sh @@ -4,10 +4,13 @@ TEMPDIR=/tmp/pspp-tst-$$ -here=`pwd`; +# ensure that top_builddir are absolute +if [ -z "$top_builddir" ] ; then top_builddir=. ; fi +if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi +top_builddir=`cd $top_builddir; pwd` # ensure that top_srcdir is absolute -cd $top_srcdir; top_srcdir=`pwd` +top_srcdir=`cd $top_srcdir; pwd` STAT_CONFIG_PATH=$top_srcdir/config export STAT_CONFIG_PATH @@ -1300,7 +1303,7 @@ sed < $TEMPDIR/expr-list >> $TEMPDIR/expr-opt.stat \ if [ $? -ne 0 ] ; then no_result ; fi activity="run optimizing program" -$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii \ +$SUPERVISOR $top_builddir/src/pspp --testing-mode -o raw-ascii \ $TEMPDIR/expr-opt.stat >$TEMPDIR/expr-opt.err 2> $TEMPDIR/expr-opt.out activity="compare optimizing output" @@ -1316,7 +1319,7 @@ sed < $TEMPDIR/expr-list >> $TEMPDIR/expr-noopt.stat \ if [ $? -ne 0 ] ; then no_result ; fi activity="run non-optimizing program" -$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii \ +$SUPERVISOR $top_builddir/src/pspp --testing-mode -o raw-ascii \ $TEMPDIR/expr-noopt.stat >$TEMPDIR/expr-noopt.err 2> $TEMPDIR/expr-noopt.out activity="compare non-optimizing output" @@ -1332,7 +1335,7 @@ sed < $TEMPDIR/expr-list >> $TEMPDIR/expr-opt-pos.stat \ if [ $? -ne 0 ] ; then no_result ; fi activity="run optimizing postfix program" -$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii \ +$SUPERVISOR $top_builddir/src/pspp --testing-mode -o raw-ascii \ $TEMPDIR/expr-opt-pos.stat >$TEMPDIR/expr-opt-pos.err 2> $TEMPDIR/expr-opt-pos.out if [ $? -eq 0 ] ; then no_result ; fi @@ -1344,7 +1347,7 @@ sed < $TEMPDIR/expr-list >> $TEMPDIR/expr-noopt-pos.stat \ if [ $? -ne 0 ] ; then no_result ; fi activity="run non-optimizing postfix program" -$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii \ +$SUPERVISOR $top_builddir/src/pspp --testing-mode -o raw-ascii \ $TEMPDIR/expr-noopt-pos.stat >$TEMPDIR/expr-noopt-pos.err 2> $TEMPDIR/expr-noopt-pos.out if [ $? -eq 0 ] ; then no_result ; fi