Fixed test drivers for use in MinGW

v0.27.3
Andreas Huggel 21 years ago
parent 875cb0892e
commit 72c6c67c34

@ -2,6 +2,13 @@
# Test driver to run the addmoddel sample program
results="./tmp/addmoddel.out"
good="./data/addmoddel.out"
diffargs="--strip-trailing-cr"
tmpfile=tmp/ttt
touch $tmpfile
diff -q $diffargs $tmpfile $tmpfile 2>/dev/null
if [ $? -ne 0 ] ; then
diffargs=""
fi
(
LD_LIBRARY_PATH=../../src:$LD_LIBRARY_PATH
exiv2="../../src/exiv2"
@ -12,10 +19,10 @@ $binpath/addmoddel exiv2-empty.jpg
$binpath/exiv2 -pv exiv2-empty.jpg
) > $results
diff -q --strip-trailing-cr $results $good
diff -q $diffargs $results $good
rc=$?
if [ $rc -eq 0 ] ; then
echo "All testcases passed."
else
diff --strip-trailing-cr $results $good
diff $diffargs $results $good
fi

@ -4,6 +4,13 @@ LD_LIBRARY_PATH=../../src:$LD_LIBRARY_PATH
exiv2="../../src/exiv2"
results="./tmp/exiv2-test.out"
good="./data/exiv2-test.out"
diffargs="--strip-trailing-cr"
tmpfile=tmp/ttt
touch $tmpfile
diff -q $diffargs $tmpfile $tmpfile 2>/dev/null
if [ $? -ne 0 ] ; then
diffargs=""
fi
(
images="exiv2-empty.jpg \
exiv2-canon-powershot-s40.jpg \
@ -85,10 +92,10 @@ diff iii kkk
) > $results 2>&1
diff -q --strip-trailing-cr $results $good
diff -q -w $diffargs $results $good
rc=$?
if [ $rc -eq 0 ] ; then
echo "All testcases passed."
else
diff --strip-trailing-cr $results $good
diff -w $diffargs $results $good
fi

@ -1,4 +1,4 @@
#! /bin/bash
#! /bin/sh
# Test driver for image file i/o
eraseTest()

@ -1,4 +1,4 @@
#! /bin/bash
#! /bin/sh
# Test driver for Iptc metadata
printTest()
@ -99,7 +99,7 @@ diffCheck()
good=$2
#run diff and check results
diff -q --strip-trailing-cr $test $good
diff -q $diffargs $test $good
if [ $? -ne 0 ]; then
let ++errors
else
@ -113,6 +113,13 @@ diffCheck()
LD_LIBRARY_PATH=../../src:$LD_LIBRARY_PATH
binpath="../../src"
datapath="../data"
diffargs="--strip-trailing-cr"
tmpfile=tmp/ttt
touch $tmpfile
diff -q $diffargs $tmpfile $tmpfile 2>/dev/null
if [ $? -ne 0 ] ; then
diffargs=""
fi
test_files="smiley1.jpg smiley2.jpg glider.exv table.jpg"

@ -2,6 +2,13 @@
# Test driver for tests of MakerNoteFactory::match
results="./tmp/makernote-test.out"
good="./data/makernote-test.out"
diffargs="--strip-trailing-cr"
tmpfile=tmp/ttt
touch $tmpfile
diff -q $diffargs $tmpfile $tmpfile 2>/dev/null
if [ $? -ne 0 ] ; then
diffargs=""
fi
(
LD_LIBRARY_PATH=../../src:$LD_LIBRARY_PATH
binpath="../../src"
@ -9,10 +16,10 @@ cd ./tmp
$binpath/makernote-test
) > $results
diff -q $results $good
diff -q $diffargs $results $good
rc=$?
if [ $rc -eq 0 ] ; then
echo "All testcases passed."
else
diff $results $good
diff $diffargs $results $good
fi

@ -34,6 +34,13 @@ runTestCase()
LD_LIBRARY_PATH=../../src:$LD_LIBRARY_PATH
binpath="../../src"
datapath="."
diffargs="--strip-trailing-cr"
tmpfile=tmp/ttt
touch $tmpfile
diff -q $diffargs $tmpfile $tmpfile 2>/dev/null
if [ $? -ne 0 ] ; then
diffargs=""
fi
images="exiv2-canon-powershot-s40.jpg \
exiv2-kodak-dc210.jpg \
@ -60,10 +67,10 @@ runTestCase 11 $datapath/exiv2-nikon-d70.jpg
) > tmp/write-test.out 2>&1
diff -q --strip-trailing-cr tmp/write-test.out data/write-test.out
diff -q -w $diffargs tmp/write-test.out data/write-test.out
rc=$?
if [ $rc -eq 0 ] ; then
echo "All testcases passed."
else
diff --strip-trailing-cr tmp/write-test.out data/write-test.out
diff -w $diffargs tmp/write-test.out data/write-test.out
fi

@ -2,6 +2,13 @@
# Test driver for write unit tests to build Exif metadata from scratch
results="./tmp/write2-test.out"
good="./data/write2-test.out"
diffargs="--strip-trailing-cr"
tmpfile=tmp/ttt
touch $tmpfile
diff -q $diffargs $tmpfile $tmpfile 2>/dev/null
if [ $? -ne 0 ] ; then
diffargs=""
fi
(
LD_LIBRARY_PATH=../../src:$LD_LIBRARY_PATH
binpath="../../src"
@ -10,10 +17,10 @@ cd ./tmp
$binpath/write2-test exiv2-empty.jpg
) > $results
diff -q $results $good
diff -q $diffargs $results $good
rc=$?
if [ $rc -eq 0 ] ; then
echo "All testcases passed."
else
diff $results $good
diff $diffargs $results $good
fi

Loading…
Cancel
Save