#1240 Strengthened test/http-test.

This commit is contained in:
Robin Mills
2016-10-18 16:07:22 +00:00
parent b9f584fbbf
commit 551223ec92
2 changed files with 37 additions and 22 deletions
+5
View File
@@ -3,5 +3,10 @@ Exif.Image.Software Ascii 40 Adobe Photoshop Elem
ReaganLargePng.png
Exif.Image.Software Ascii 11 GIMP 2.9.5
ReaganLargeTiff.tiff
Exif.Image.Software Ascii 11 GIMP 2.9.5
ReaganLargeJpg.jpg
Exif.Image.Software Ascii 12 GIMP 2.8.18
Reagan.tiff
Exif.Image.Software Ascii 29 Adobe Photoshop CS Macintosh
DSC_0002.NEF
Exif.Image.Software Ascii 10 Ver.1.00
+32 -22
View File
@@ -1,35 +1,45 @@
#!/bin/bash
# Test driver for http
# Test driver for http/https
source ./functions.source
cd "$testdir"
pushd "$testdir" 2>/dev/null
recursive=$1
server=exiv2.dyndns.org
dir=userContent/testfiles/webready
hosts="http://$server:8080"
host="http://$server:8080"
if [ $(runTest exiv2 -vVg curlproto | grep -q https ; echo $?) == "0" ]; then
hosts="https://$server:8443"
else
echo "https is not a supported protocol"
if [ ! -z "$recursive" ]; then
if [ $(runTest exiv2 -vVg curlproto | grep -q https ; echo $?) == "0" ]; then
host="https://$server:8443"
else
echo "*** https is not a supported protocol - test skipped ***"
exit 0
fi
fi
( ( for host in $hosts ; do
printf "$host " >&3
for filename in Reagan.jpg ReaganLargePng.png ReaganLargeTiff.tiff ReaganLargeJpg.jpg; do
echo $filename
runTest exiv2 -pa --grep Software $host/$dir/$filename
done
done
) 2>&1 > $results
echo 'server: ' $host
(
for filename in Reagan.jpg ReaganLargePng.png ReaganLargeTiff.tiff ReaganLargeJpg.jpg Reagan.tiff DSC_0002.NEF ; do
echo $filename
runTest exiv2 -pa --grep Software $host/$dir/$filename
done
) 2>&1 > $results
# ----------------------------------------------------------------------
# Evaluate results
cat $results | tr -d $'\r' > $results-stripped
mv $results-stripped $results
reportTest $results $good
popd 2>/dev/null
if [ -z "$recursive" ]; then
$0 1
fi
# ----------------------------------------------------------------------
# Evaluate results
cat $results | tr -d $'\r' > $results-stripped
mv $results-stripped $results
reportTest $results $good
) 3>&1
printf "\n"
# That's all Folks!