testit.sh: Work with srcdir != builddir.
CVS patchset: 3550
CVS date: 2000/02/11 04:44:14
AUTOMAKE_OPTIONS = 1.4 foreign
EXTRA_DIST = autogen.sh CHANGES $(man_MANS) popt.spec \
- testit.sh po/Makefile.in.in po/POTFILES.in po/*.po po/popt.pot popt.ps
+ testit.sh test-poptrc \
+ po/Makefile.in.in po/POTFILES.in po/sk.po po/ro.po po/popt.pot \
+ popt.ps
SUBDIRS = intl po
#!/bin/sh
-${test1:=./test1}
-
run() {
prog=$1; shift
name=$1; shift
echo Running test $name.
- result=`./$prog $*`
+ result=`$builddir/$prog $*`
if [ "$answer" != "$result" ]; then
- echo "Test \"$*\" failed with: $result"
+ echo "Test \"$*\" failed with: \"$result\" != \"$answer\" "
exit 2
fi
}
-make -q testcases
+builddir=`pwd`
+cd ${srcdir}
+test1=${builddir}/test1
+echo "Running tests in `pwd`"
+
+#make -q testcases
run test1 "test1 - 1" "arg1: 1 arg2: (none)" --arg1
run test1 "test1 - 2" "arg1: 0 arg2: foo" --arg2 foo