projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed 'Written by' line
[pspp-builds.git]
/
tests
/
bugs
/
t-test-with-temp.sh
diff --git
a/tests/bugs/t-test-with-temp.sh
b/tests/bugs/t-test-with-temp.sh
index b7803d20a163e68e45508f953c604d8dc2114514..7882d8a587ec229692b03f0946ff345606832e5d 100755
(executable)
--- a/
tests/bugs/t-test-with-temp.sh
+++ b/
tests/bugs/t-test-with-temp.sh
@@
-4,17
+4,24
@@
# works ok with a TEMPORARY transformation
TEMPDIR=/tmp/pspp-tst-$$
# works ok with a TEMPORARY transformation
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
# 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()
{
cleanup()
{
+ cd /
rm -rf $TEMPDIR
}
rm -rf $TEMPDIR
}
@@
-47,7
+54,7
@@
mkdir -p $TEMPDIR
cd $TEMPDIR
activity="create program"
cd $TEMPDIR
activity="create program"
-cat > $TE
MPDIR/out.stat
<<EOF
+cat > $TE
STFILE
<<EOF
data list list /ind * x * .
begin data.
1 3.5
data list list /ind * x * .
begin data.
1 3.5
@@
-64,7
+71,7
@@
if [ $? -ne 0 ] ; then no_result ; fi
activity="run program"
activity="run program"
-$SUPERVISOR $
here/../src/pspp -o raw-ascii $TEMPDIR/out.stat
+$SUPERVISOR $
PSPP --testing-mode $TESTFILE
if [ $? -ne 0 ] ; then no_result ; fi
activity="copy output"
if [ $? -ne 0 ] ; then no_result ; fi
activity="copy output"
@@
-72,7
+79,7
@@
cp $TEMPDIR/pspp.list $TEMPDIR/first.list
if [ $? -ne 0 ] ; then no_result ; fi
activity="create program 2"
if [ $? -ne 0 ] ; then no_result ; fi
activity="create program 2"
-cat > $TE
MPDIR/out.stat
<<EOF
+cat > $TE
STFILE
<<EOF
data list list /ind * x * .
begin data.
1 3.5
data list list /ind * x * .
begin data.
1 3.5
@@
-92,7
+99,8
@@
EOF
if [ $? -ne 0 ] ; then no_result ; fi
activity="compare output"
if [ $? -ne 0 ] ; then no_result ; fi
activity="compare output"
-diff -B -b $TEMPDIR/pspp.list $TEMPDIR/first.list
+perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list $TEMPDIR/first.list
+diff -b $TEMPDIR/pspp.list $TEMPDIR/first.list
if [ $? -ne 0 ] ; then fail ; fi
if [ $? -ne 0 ] ; then fail ; fi