X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fexpressions%2Fvectors.sh;h=57cef8b6607da8d3cba4f6ab98db333088d2e468;hb=b9a18d43ace66798d4f2eaaab063fd06b30d5f8f;hp=c7419a56637aee57081ebdbcf3daf855c1109640;hpb=4a73877b4d56caed03d383fb4d38347a9774046f;p=pspp-builds.git diff --git a/tests/expressions/vectors.sh b/tests/expressions/vectors.sh index c7419a56..57cef8b6 100755 --- a/tests/expressions/vectors.sh +++ b/tests/expressions/vectors.sh @@ -4,17 +4,26 @@ 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() { + if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then + echo "NOT cleaning $TEMPDIR" + return ; + fi cd / rm -rf $TEMPDIR } @@ -69,13 +78,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 --testing-mode $TEMPDIR/vectors.stat > $TEMPDIR/vectors.err 2> $TEMPDIR/vectors.out if [ $? -ne 0 ] ; then fail ; fi activity="compare results" perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list diff -b $TEMPDIR/pspp.list - <