summaryrefslogtreecommitdiff
path: root/tests/lmp-v.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lmp-v.sh')
-rwxr-xr-xtests/lmp-v.sh22
1 files changed, 15 insertions, 7 deletions
diff --git a/tests/lmp-v.sh b/tests/lmp-v.sh
index a8c6740e..2b9222f6 100755
--- a/tests/lmp-v.sh
+++ b/tests/lmp-v.sh
@@ -7,23 +7,31 @@
# the architecture.
exitcode=0
+srcdir=${1-..}
+echo $0 using ${srcdir}
+
+testdir=${srcdir}/tests
+passedfile=tests/.passed
+failedfile=tests/.failed
+passed=`cat ${passedfile}`
+failed=`cat ${failedfile}`
# A Windows build may have no file named Makefile and also a version of grep
# that won't return an error when the file does not exist. Work around.
-if [ ! -f ../Makefile ]
+if [ ! -f Makefile ]
then
printf ' %-35s: TEST SKIPPED (no Makefile)\n' 'lmp-v'
-elif grep '^CC = .*gcc' ../Makefile >/dev/null
+elif grep '^CC = .*gcc' Makefile >/dev/null
then
- passed=`cat .passed`
- failed=`cat .failed`
- if ./TESTonce lmp-v lmp.pcap lmp-v.out '-T lmp -v'
+ passed=`cat ${passedfile}`
+ failed=`cat ${failedfile}`
+ if ${testdir}/TESTonce lmp-v ${testdir}/lmp.pcap ${testdir}/lmp-v.out '-T lmp -v'
then
passed=`expr $passed + 1`
- echo $passed >.passed
+ echo $passed >${passedfile}
else
failed=`expr $failed + 1`
- echo $failed >.failed
+ echo $failed >${failedfile}
exitcode=1
fi
else