Updated input and output directories

v0.27.3
Andreas Huggel 21 years ago
parent 5e8980a445
commit 95bd3d8312

@ -5,13 +5,13 @@ eraseTest()
{ {
src=$1 src=$1
test=${src}.etst test=${src}.etst
good=${src}.egd good=$datapath/${src}.egd
#setup #setup
cp $src $test cp $datapath/$src $test
#run tests #run tests
../src/metacopy $test $test $binpath/metacopy $test $test
#check results #check results
diffCheck $test $good diffCheck $test $good
@ -24,13 +24,13 @@ copyTest()
src=$2 src=$2
dst=$3 dst=$3
test=${dst}.c${num}tst test=${dst}.c${num}tst
good=${dst}.c${num}gd good=$datapath/${dst}.c${num}gd
#setup #setup
cp $dst $test cp $datapath/$dst $test
#run tests #run tests
../src/metacopy -a $src $test $binpath/metacopy -a $datapath/$src $test
#check results #check results
diffCheck $test $good diffCheck $test $good
@ -43,13 +43,13 @@ iptcTest()
src=$2 src=$2
dst=$3 dst=$3
test=${dst}.i${num}tst test=${dst}.i${num}tst
good=${dst}.i${num}gd good=$datapath/${dst}.i${num}gd
#setup #setup
cp $dst $test cp $datapath/$dst $test
#run tests #run tests
../src/metacopy -ip $src $test $binpath/metacopy -ip $datapath/$src $test
#check results #check results
diffCheck $test $good diffCheck $test $good
@ -72,10 +72,16 @@ diffCheck()
fi fi
} }
# **********************************************************************
# main
binpath="../../src"
datapath="../data"
test_files="table.jpg smiley1.jpg smiley2.jpg" test_files="table.jpg smiley1.jpg smiley2.jpg"
let errors=0 let errors=0
cd ../test cd ./tmp
echo echo
echo -n "Erase all tests" echo -n "Erase all tests"

@ -5,10 +5,10 @@ printTest()
{ {
src=$1 src=$1
test=${src}.iptst test=${src}.iptst
good=${src}.ipgd good=$datapath/${src}.ipgd
#run tests #run tests
../src/iptcprint $src > $test $binpath/iptcprint $datapath/$src > $test
#check results #check results
diffCheck $test $good diffCheck $test $good
@ -20,13 +20,13 @@ removeTest()
src=$1 src=$1
tmp="temp" tmp="temp"
test=${src}.irtst test=${src}.irtst
good=${src}.irgd good=$datapath/${src}.irgd
#setup #setup
cp $src $tmp cp $datapath/$src $tmp
#run tests #run tests
../src/iptctest $tmp <<-eoc $binpath/iptctest $tmp <<-eoc
r Iptc.Application2.Byline r Iptc.Application2.Byline
r Iptc.Application2.Caption r Iptc.Application2.Caption
r Iptc.Application2.Keywords r Iptc.Application2.Keywords
@ -34,7 +34,7 @@ removeTest()
r Iptc.Application2.Keywords r Iptc.Application2.Keywords
r Iptc.Application2.CountryName r Iptc.Application2.CountryName
eoc eoc
../src/iptcprint $tmp > $test $binpath/iptcprint $tmp > $test
#check results #check results
diffCheck $test $good diffCheck $test $good
@ -47,13 +47,13 @@ addModTest()
src=$1 src=$1
tmp="temp" tmp="temp"
test=${src}.iatst test=${src}.iatst
good=${src}.iagd good=$datapath/${src}.iagd
#setup #setup
cp $src $tmp cp $datapath/$src $tmp
#run tests #run tests
../src/iptctest $tmp <<-eoc $binpath/iptctest $tmp <<-eoc
a Iptc.Application2.Headline The headline I am a Iptc.Application2.Headline The headline I am
a Iptc.Application2.Keywords Yet another keyword a Iptc.Application2.Keywords Yet another keyword
m Iptc.Application2.DateCreated 2004-8-3 m Iptc.Application2.DateCreated 2004-8-3
@ -63,7 +63,7 @@ addModTest()
a Iptc.Envelope.TimeSent 14:41:0-05:00 a Iptc.Envelope.TimeSent 14:41:0-05:00
a Iptc.Application2.RasterizedCaption 230 42 34 2 90 84 23 146 a Iptc.Application2.RasterizedCaption 230 42 34 2 90 84 23 146
eoc eoc
../src/iptcprint $tmp > $test $binpath/iptcprint $tmp > $test
#check results #check results
diffCheck $test $good diffCheck $test $good
@ -76,14 +76,14 @@ extendedTest()
src=$1 src=$1
tmp="temp" tmp="temp"
test=${src}.ixtst test=${src}.ixtst
good=${src}.ixgd good=$datapath/${src}.ixgd
#setup #setup
cp $src $tmp cp $datapath/$src $tmp
#run tests #run tests
../src/iptctest $tmp < ext.dat $binpath/iptctest $tmp < $datapath/ext.dat
../src/iptcprint $tmp > $test $binpath/iptcprint $tmp > $test
#check results #check results
diffCheck $test $good diffCheck $test $good
@ -107,10 +107,16 @@ diffCheck()
fi fi
} }
# **********************************************************************
# main
binpath="../../src"
datapath="../data"
test_files="smiley1.jpg smiley2.jpg glider.exv table.jpg" test_files="smiley1.jpg smiley2.jpg glider.exv table.jpg"
let errors=0 let errors=0
cd ../test cd ./tmp
echo echo
echo -n "Read tests" echo -n "Read tests"

@ -8,46 +8,51 @@
# file : Input file # file : Input file
# Abstract: # Abstract:
# Run the requested test case number with the given file # Run the requested test case number with the given file
runTestCase() runTestCase()
{ {
rtc_number=$1 rtc_number=$1
rtc_infile=$2 rtc_infile=$2
rtc_outfile=test${rtc_number}.jpg rtc_outfile=$datapath/test${rtc_number}.jpg
rtc_jpgthumb=thumb${rtc_number}.jpg rtc_jpgthumb=$datapath/thumb${rtc_number}.jpg
rtc_tifthumb=thumb${rtc_number}.tif rtc_tifthumb=$datapath/thumb${rtc_number}.tif
rm -f $rtc_outfile $rtc_jpgthumb $rtc_tifthumb rm -f $rtc_outfile $rtc_jpgthumb $rtc_tifthumb
rm -f iii ttt; rm -f $datapath/iii $datapath/ttt;
echo "------------------------------------------------------------" echo "------------------------------------------------------------"
./exifprint $rtc_infile > iii; $binpath/exifprint $rtc_infile > $datapath/iii;
cp $rtc_infile $rtc_outfile; cp $rtc_infile $rtc_outfile;
./write-test $rtc_infile $rtc_number > ttt; $binpath/write-test $rtc_infile $rtc_number > $datapath/ttt;
diff iii ttt diff $datapath/iii $datapath/ttt
} }
# ********************************************************************** # **********************************************************************
# main # main
images="img_1771.jpg \ binpath="../../src"
kodak-dc210.jpg \ datapath="."
dscf0176.jpg \
sigma-d10-IMG10086.jpg \ images="exiv2-canon-powershot-s40.jpg \
nikon-coolpix-990-DSCN1180.jpg \ exiv2-kodak-dc210.jpg \
nikon-d70-dsc_0063.jpg \ exiv2-fujifilm-finepix-s2pro.jpg \
nikon-e950.jpg" exiv2-sigma-d10.jpg \
exiv2-nikon-e990.jpg \
for i in $images; do cp -f ../test/images/$i ./; done exiv2-nikon-d70.jpg \
exiv2-nikon-e950.jpg"
runTestCase 1 ./img_1771.jpg
runTestCase 2 ./img_1771.jpg for i in $images; do cp -f ./data/$i ./tmp; done
runTestCase 3 ./kodak-dc210.jpg cd ./tmp
runTestCase 4 ./img_1771.jpg
runTestCase 5 ./img_1771.jpg runTestCase 1 $datapath/exiv2-canon-powershot-s40.jpg
runTestCase 6 ./kodak-dc210.jpg runTestCase 2 $datapath/exiv2-canon-powershot-s40.jpg
runTestCase 7 ./dscf0176.jpg runTestCase 3 $datapath/exiv2-kodak-dc210.jpg
runTestCase 8 ./sigma-d10-IMG10086.jpg runTestCase 4 $datapath/exiv2-canon-powershot-s40.jpg
runTestCase 9 ./nikon-coolpix-990-DSCN1180.jpg runTestCase 5 $datapath/exiv2-canon-powershot-s40.jpg
runTestCase 10 ./nikon-e950.jpg runTestCase 6 $datapath/exiv2-kodak-dc210.jpg
runTestCase 11 ./nikon-d70-dsc_0063.jpg runTestCase 7 $datapath/exiv2-fujifilm-finepix-s2pro.jpg
runTestCase 8 $datapath/exiv2-sigma-d10.jpg
runTestCase 9 $datapath/exiv2-nikon-e990.jpg
runTestCase 10 $datapath/exiv2-nikon-e950.jpg
runTestCase 11 $datapath/exiv2-nikon-d70.jpg

Loading…
Cancel
Save