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`
+PSPP=$top_builddir/src/ui/terminal/pspp
# 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
if [ $? -ne 0 ] ; then no_result ; fi
activity="run optimizing program"
-$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii \
+$SUPERVISOR $PSPP --testing-mode -o raw-ascii \
$TEMPDIR/expr-opt.stat >$TEMPDIR/expr-opt.err 2> $TEMPDIR/expr-opt.out
activity="compare optimizing output"
if [ $? -ne 0 ] ; then no_result ; fi
activity="run non-optimizing program"
-$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii \
+$SUPERVISOR $PSPP --testing-mode -o raw-ascii \
$TEMPDIR/expr-noopt.stat >$TEMPDIR/expr-noopt.err 2> $TEMPDIR/expr-noopt.out
activity="compare non-optimizing output"
if [ $? -ne 0 ] ; then no_result ; fi
activity="run optimizing postfix program"
-$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii \
+$SUPERVISOR $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
if [ $? -ne 0 ] ; then no_result ; fi
activity="run non-optimizing postfix program"
-$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii \
+$SUPERVISOR $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