X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fexpressions%2Fvectors.sh;h=52b9be62e4a0196f684d1a160756c91f1329144c;hb=65a4e29574b67921ea899b6a1d45806dca11db00;hp=07f7c31b1250164733cc23def44836ec0c474a67;hpb=44d7b18d5c3d0a806fe1a29658445254f2376600;p=pspp diff --git a/tests/expressions/vectors.sh b/tests/expressions/vectors.sh index 07f7c31b12..52b9be62e4 100755 --- a/tests/expressions/vectors.sh +++ b/tests/expressions/vectors.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 @@ -69,12 +71,13 @@ EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/vectors.stat > $TEMPDIR/vectors.err 2> $TEMPDIR/vectors.out +$SUPERVISOR $PSPP -o raw-ascii $TEMPDIR/vectors.stat > $TEMPDIR/vectors.err 2> $TEMPDIR/vectors.out if [ $? -ne 0 ] ; then fail ; fi activity="compare results" -diff -b -B $TEMPDIR/pspp.list - <