From 9811c9d95cd9628642f6533aa0b32997d40491d9 Mon Sep 17 00:00:00 2001 From: clanmills Date: Fri, 23 Oct 2020 13:12:49 +0100 Subject: [PATCH] Fixing EXIV2_PORT on MinGW/msys2. --- test/functions.source | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/test/functions.source b/test/functions.source index d7609a66..7aef1e9c 100644 --- a/test/functions.source +++ b/test/functions.source @@ -375,17 +375,16 @@ checkSum() } ## -# startHttpServer - power up the python web server +# startServer - power up the python web server startHttpServer() { cd "${testdir}/.." # testdir is the tmp output directory - - if [ "$platform" == "cygwin" ]; then dport=12762 - elif [ "$platform" == "mingw" ]; then dport=12761 - else dport=12760 + if [ "$platform" == "platform=cygwin" ]; then dport=12762 + elif [ "$platform" == "platform=mingw64" ]; then dport=12761 + else dport=12760 fi - if [ ! -z $EXIV2_PORT ]; then port=$EXIV2_PORT ; else port=$dport ; fi - if [ ! -z $EXIV2_HTTP ]; then http=$EXIV2_HTTP ; else http=http://localhost; fi + if [ ! -z "$EXIV2_PORT" ]; then port=$EXIV2_PORT ; else port=$dport ; fi + if [ ! -z "$EXIV2_HTTP" ]; then http=$EXIV2_HTTP ; else http=http://localhost; fi exiv2_url=$http:$port python3 -m http.server $port & # start a background local HTTP server in the "real" test directory sleep 2 # wait for it to init or die! @@ -418,7 +417,7 @@ prepareTest() os=$(uname -o) if [ $os == Cygwin ]; then PLATFORM=cygwin - elif [ os == Msys ]; then + elif [ $os == Msys ]; then PLATFORM=mingw fi fi