Checkin of new directory structure.
[pspp-builds.git] / tests / expressions / expressions.sh
index b4850d7ebdc07eaac3b4123edaed7c6bd6662962..b21fb8e1f492fac76cc57a9e496953a8258a0825 100755 (executable)
@@ -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