X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Ffile-label.sh;h=ca9da9cdc8064ea37d18a9ecffe98352e20febab;hb=c9995451f0a91a645e1fdfeb9229090001af9c5b;hp=37a0cbd77708cbcaaf69b6ca30ee80846edd117d;hpb=05e356b2a3087e819ef3b5388e29c822f41502e1;p=pspp-builds.git diff --git a/tests/command/file-label.sh b/tests/command/file-label.sh index 37a0cbd7..ca9da9cd 100755 --- a/tests/command/file-label.sh +++ b/tests/command/file-label.sh @@ -5,16 +5,22 @@ TEMPDIR=/tmp/pspp-tst-$$ TESTFILE=$TEMPDIR/`basename $0`.sps -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` -export STAT_CONFIG_PATH=$top_srcdir/config +STAT_CONFIG_PATH=$top_srcdir/config +export STAT_CONFIG_PATH cleanup() { + cd / rm -rf $TEMPDIR } @@ -50,7 +56,7 @@ activity="create program" cat > $TESTFILE << EOF /* Set up a dummy active file in memory. -data list /x 1 y 2. +data list /X 1 Y 2. begin data. 16 27 @@ -104,7 +110,7 @@ EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $TESTFILE +$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE if [ $? -ne 0 ] ; then no_result ; fi # We need to filter out the dates/times @@ -114,49 +120,37 @@ if [ $? -ne 0 ] ; then no_result ; fi activity="compare results" -diff -b -B $TEMPDIR/pspp.filtered - <