X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=tests%2Fexpressions%2Fvariables.sh;h=8ffe3c8d87bebd533d39f84d1435d7744ed83ccb;hb=b8a90d7b20f0e20b3279d224f8fcd3025fd88905;hp=d67a9c4cd52e3b68b5869f332f6efec413148185;hpb=7f3ac8559f71179a95fad28a30882ca476d8ac99;p=pspp-builds.git diff --git a/tests/expressions/variables.sh b/tests/expressions/variables.sh index d67a9c4c..8ffe3c8d 100755 --- a/tests/expressions/variables.sh +++ b/tests/expressions/variables.sh @@ -4,17 +4,22 @@ 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 +LANG=C +export LANG cleanup() { + cd / rm -rf $TEMPDIR } @@ -92,12 +97,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 --testing-mode $TEMPDIR/variables.stat > $TEMPDIR/variables.err 2> $TEMPDIR/variables.out if [ $? -ne 0 ] ; then fail ; fi activity="compare results" -diff -b -B $TEMPDIR/pspp.list - <