fix_1219_msvc_test_0.27

v0.27.3
Robin Mills 5 years ago
parent 8be155b0d0
commit cc7c8fedc3

@ -2,8 +2,8 @@
# Test driver for CRW file operations
source ./functions.source
( cd "$testdir"
(
cd "$testdir"
crwfile=exiv2-canon-powershot-s40.crw
# ----------------------------------------------------------------------
# Testcases: Add and modify tags
@ -22,7 +22,7 @@ source ./functions.source
copyTestFile $crwfile
runTest exiv2 -v -pt $crwfile
runTest exiv2 -v -m$cmdfile $crwfile
runTest exiv2 -v -pt $crwfile
runTest exiv2 -v -pt $crwfile
# ----------------------------------------------------------------------
# Testcases: Delete tags
@ -31,7 +31,7 @@ source ./functions.source
runTest exiv2 -v -M'del Exif.Canon.OwnerName' $crwfile
runTest exiv2 -v -pt $crwfile
) 3>&1 > $results
) 2>&1 | sed -e 's#19:54#18:54#g' > $results # sed evades TZ issue on MSVC builds #1221
reportTest

@ -379,16 +379,9 @@ checkSum()
startHttpServer() {
cd "${testdir}/.." # testdir is the tmp output directory
# PLATFORM = the scripting host (eg mingw)
# host = the build host (eg windows for msvc)
if [ $PLATFORM == 'cygwin' -o $PLATFORM == 'mingw' ]; then
host=$(runTest exiv2 -vVg platform | tail -1 | cut -d= -f 2) # windows
fi
if [ "$host" != windows ]; then host="$PLATFORM" ; fi
if [ "$host" == "cygwin" ]; then dport=12762
elif [ "$host" == "mingw" ]; then dport=12761
else dport=12760
if [ "$platform" == "cygwin" ]; then dport=12762
elif [ "$platform" == "mingw" ]; then dport=12761
else dport=12760
fi
if [ ! -z $EXIV2_PORT ]; then port=$EXIV2_PORT ; else port=$dport ; fi
@ -420,12 +413,14 @@ prepareTest()
export TZ=BST-1
os=$(uname)
if [ "${os:0:4}" == "CYGW" ]; then
export PLATFORM=cygwin
elif [ "${os:0:4}" == "MING" -o "${os:0:4}" == "MSYS" ]; then
export PLATFORM=mingw
else
export PLATFORM=$os
export PLATFORM=$os
if [ $os != FreeBSD -a $os != NetBSD -a $os != SunOS -a $os != Darwin -a $os != Linux ]; then
os=$(uname -o)
if [ $os == Cygwin ]; then
PLATFORM=cygwin
elif [ os == Msys ]; then
PLATFORM=mingw
fi
fi
if [ "$PLATFORM" == cygwin -o "$PLATFORM" == mingw ]; then
@ -500,6 +495,15 @@ prepareTest()
exit 42
fi
done
# set platform for msvc builds
platform=$PLATFORM
if [ $PLATFORM == mingw -o $PLATFORM == cygwin ]; then
platform=$(runTest exiv2 -vV 2>/dev/null | grep platform=)
if [ "$platform" == "platform=windows" ]; then
platform="windows"
fi
fi
}
prepareTest

Loading…
Cancel
Save