- # run make in the sonar wrapper && run the tests only if the build suceeded
- - ./tools/internal/travis-sonarqube.sh make VERBOSE=1 && ctest --output-on-failure --timeout 100
+ # run make in the sonar wrapper && run the tests before sonar to get coverage info
+ - ./tools/internal/travis-sonarqube.sh make VERBOSE=1
+ # if sonar was not run, run the tests manually
+ - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ctest --output-on-failure --timeout 100 ; fi