From 3cf3635ae2cdb85c729e1fe20aea62b421ac971c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= Date: Sun, 17 Dec 2017 12:13:42 +0100 Subject: [PATCH] [travis] Fix unit tests on Mac. - Use libc++ instead of libstdc++ in the conan profile - Add CMAKE_OPTIONS for Mac --- .travis.yml | 2 +- .travis/install.sh | 2 +- .travis/run.sh | 9 ++------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2a841971..e2c8887d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ matrix: - os: osx osx_image: xcode9 compiler: clang - env: PYTHON=3.6.2 + env: PYTHON=3.6.2 CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DEXIV2_ENABLE_VIDEO=ON -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_BUILD_UNIT_TESTS=ON" # All enabled env: #- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release" # Default diff --git a/.travis/install.sh b/.travis/install.sh index 4dc4d4be..c78a68fb 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -40,6 +40,6 @@ if [[ "$(uname -s)" == 'Linux' ]]; then printf "[settings]\nos=Linux\narch=x86_64\ncompiler=gcc\ncompiler.version=4.8\ncompiler.libcxx=libstdc++\nbuild_type=Release\n" > ~/.conan/profiles/release fi else - printf "[settings]\nos=Macos\narch=x86_64\ncompiler=apple-clang\ncompiler.version=9.0\ncompiler.libcxx=libstdc++\nbuild_type=Release\n" > ~/.conan/profiles/release + printf "[settings]\nos=Macos\narch=x86_64\ncompiler=apple-clang\ncompiler.version=9.0\ncompiler.libcxx=libc++\nbuild_type=Release\n" > ~/.conan/profiles/release fi diff --git a/.travis/run.sh b/.travis/run.sh index 143ce9d9..f2fcec30 100755 --- a/.travis/run.sh +++ b/.travis/run.sh @@ -19,10 +19,5 @@ cmake ${CMAKE_OPTIONS} -DCMAKE_INSTALL_PREFIX=install .. make -j2 make tests make install - -# Only run unit tests on Linux for the moment -# TODO: Check what is happening on Mac -if [[ "$(uname -s)" == 'Linux' ]]; then - cd bin - ./unit_tests -fi +cd bin +./unit_tests