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 # Test driver for CRW file operations
source ./functions.source source ./functions.source
( cd "$testdir" (
cd "$testdir"
crwfile=exiv2-canon-powershot-s40.crw crwfile=exiv2-canon-powershot-s40.crw
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# Testcases: Add and modify tags # Testcases: Add and modify tags
@ -31,7 +31,7 @@ source ./functions.source
runTest exiv2 -v -M'del Exif.Canon.OwnerName' $crwfile runTest exiv2 -v -M'del Exif.Canon.OwnerName' $crwfile
runTest exiv2 -v -pt $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 reportTest

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

Loading…
Cancel
Save