tools/travis-ci/install.sh: workaround issue with jpylyzer on Mac 1495/head
authorEven Rouault <even.rouault@spatialys.com>
Fri, 8 Dec 2023 11:06:51 +0000 (12:06 +0100)
committerEven Rouault <even.rouault@spatialys.com>
Fri, 8 Dec 2023 12:28:49 +0000 (13:28 +0100)
tools/ctest_scripts/travis-ci.cmake
tools/travis-ci/install.sh

index 6dbe52c4dd216e6f5f96ee8c1456de0cf8d42b81..b9f75fff3ac5905b71807c29053a592a25f74a3e 100644 (file)
@@ -127,13 +127,19 @@ BUILD_UNIT_TESTS:BOOL=TRUE
 # JPEG2000 test files are available with git clone https://github.com/uclouvain/openjpeg-data.git
 OPJ_DATA_ROOT:PATH=$ENV{PWD}/data
 
-# jpylyzer is available with on GitHub: https://github.com/openpreserve/jpylyzer
-JPYLYZER_EXECUTABLE=$ENV{PWD}/jpylyzer/jpylyzer.${JPYLYZER_EXT}
-
 # Enable astyle
 WITH_ASTYLE:BOOL=${BUILD_ASTYLE}
 " )
 
+if(EXISTS "$ENV{PWD}/jpylyzer/jpylyzer.${JPYLYZER_EXT}")
+    set(CACHE_CONTENTS "
+${CACHE_CONTENTS}
+
+# jpylyzer is available with on GitHub: https://github.com/openpreserve/jpylyzer
+JPYLYZER_EXECUTABLE=$ENV{PWD}/jpylyzer/jpylyzer.${JPYLYZER_EXT}
+")
+endif()
+
 #---------------------
 #1. openjpeg specific:
 set( CTEST_PROJECT_NAME        "OPENJPEG" )
index 62d8c30ec8c6256e1f1549a6b4fdf76e99186e6b..1407ae8b2348a2f72be0c5c93b1b58ed6c26d1f6 100755 (executable)
@@ -59,7 +59,9 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then
        # We need jpylyzer for the test suite
     JPYLYZER_VERSION="1.17.0"    
        echo "Retrieving jpylyzer"
-       if [ "${APPVEYOR:-}" == "True" -o "${RUNNER_OS:-}" == "Windows" ]; then
+       if [ "${TRAVIS_OS_NAME:-}" == "osx"  -o "${RUNNER_OS:-}" == "macOS" ] || uname -s | grep -i Darwin &> /dev/null; then
+        echo "Skip Retrieving jpylyzer on OSX. Related tests no longer work on CI"
+       elif [ "${APPVEYOR:-}" == "True" -o "${RUNNER_OS:-}" == "Windows" ]; then
                wget -q https://github.com/openpreserve/jpylyzer/releases/download/${JPYLYZER_VERSION}/jpylyzer_${JPYLYZER_VERSION}_win32.zip
                mkdir jpylyzer
                cd jpylyzer