summaryrefslogtreecommitdiff
path: root/popt/testit.sh
diff options
context:
space:
mode:
authorsopwith <devnull@localhost>2000-02-11 04:44:14 +0000
committersopwith <devnull@localhost>2000-02-11 04:44:14 +0000
commit147c6789a9f198b77cbeff9aebe89ec0dbe70554 (patch)
tree2166ae41711194fd52389d8ff45c823634a3cf5e /popt/testit.sh
parentf7b80eb2113be009143e14c8cc526b30f97bc1f6 (diff)
downloadlibrpm-tizen-147c6789a9f198b77cbeff9aebe89ec0dbe70554.tar.gz
librpm-tizen-147c6789a9f198b77cbeff9aebe89ec0dbe70554.tar.bz2
librpm-tizen-147c6789a9f198b77cbeff9aebe89ec0dbe70554.zip
Makefile.am: Distribute test-poptrc, don't try to wildcard .po files.
testit.sh: Work with srcdir != builddir. CVS patchset: 3550 CVS date: 2000/02/11 04:44:14
Diffstat (limited to 'popt/testit.sh')
-rwxr-xr-xpopt/testit.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/popt/testit.sh b/popt/testit.sh
index fdb154130..e9b7198aa 100755
--- a/popt/testit.sh
+++ b/popt/testit.sh
@@ -1,7 +1,5 @@
#!/bin/sh
-${test1:=./test1}
-
run() {
prog=$1; shift
name=$1; shift
@@ -9,14 +7,19 @@ run() {
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