X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fexpressions%2Fvariables.sh;h=3a2a3c2b4519cbdd62ce9f79bb11fd9c7da8fc53;hb=deaede551f5448e159107ce837c3a90ee7185c74;hp=444274e9fa1db75965c3e66fb18f53c4ed89b354;hpb=b08603f631a2d998d8c604692fdf13669bb5e510;p=pspp-builds.git diff --git a/tests/expressions/variables.sh b/tests/expressions/variables.sh index 444274e9..3a2a3c2b 100755 --- a/tests/expressions/variables.sh +++ b/tests/expressions/variables.sh @@ -4,10 +4,12 @@ TEMPDIR=/tmp/pspp-tst-$$ -here=`pwd`; - -# ensure that top_srcdir is absolute -cd $top_srcdir; top_srcdir=`pwd` +# ensure that top_srcdir and top_builddir are absolute +if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi +if [ -z "$top_builddir" ] ; then top_builddir=. ; fi +top_srcdir=`cd $top_srcdir; pwd` +top_builddir=`cd $top_builddir; pwd` +PSPP=$top_builddir/src/ui/terminal/pspp STAT_CONFIG_PATH=$top_srcdir/config export STAT_CONFIG_PATH @@ -93,13 +95,13 @@ EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/variables.stat > $TEMPDIR/variables.err 2> $TEMPDIR/variables.out +$SUPERVISOR $PSPP -o raw-ascii $TEMPDIR/variables.stat > $TEMPDIR/variables.err 2> $TEMPDIR/variables.out if [ $? -ne 0 ] ; then fail ; fi activity="compare results" -perl -pi -e s/^\s*\$//g $TEMPDIR/pspp.list -diff -b $TEMPDIR/pspp.list - <