diff --git a/.travis.yml b/.travis.yml index 926cd6854..f93169838 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,8 +36,10 @@ matrix: compiler: clang before_script: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; brew install bash gcc; clang --version; gfortran --version; fi - - if [[ "$TRAVIS_OS_NAME $CC" == "osx gcc" ]]; then export CC=gcc-9 ; export CXX=g++-9 ; $CC --version; $CXX --version; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [ x`brew list | fgrep bash` != x'bash' ]; then brew install bash; fi; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [ x`brew list | fgrep gcc` != x'gcc' ]; then brew install gcc; fi; fi + - if [[ "$TRAVIS_OS_NAME $CC" == "osx gcc" ]]; then export CC=gcc-9 ; export CXX=g++-9 ; $CC --version; $CXX --version; gfortran --version; fi - cd .. - wget https://raw.githubusercontent.com/coin-or/coinbrew/master/coinbrew - export PROJECT_URL=https://github.com/$TRAVIS_REPO_SLUG diff --git a/test/unitTest.cpp b/test/unitTest.cpp index 3bb8b9395..e6561a6e2 100644 --- a/test/unitTest.cpp +++ b/test/unitTest.cpp @@ -70,9 +70,10 @@ int main (int argc, const char *argv[]) /* Set parameter defaults. */ - std::string mpsDir = dataDir + dirsep + "Sample" + dirsep ; - std::string netlibDir = dataDir + dirsep + "Netlib" + dirsep ; - std::string testModel = "p0033.mps" ; + //TKR: Don't set defaults, must be specified. + std::string mpsDir = ""; // = dataDir + dirsep + "Sample" + dirsep ; + std::string netlibDir = ""; // = dataDir + dirsep + "Netlib" + dirsep ; + std::string testModel = ""; // = "p0033.mps" ; /* Process command line parameters. Assume params of the form 'keyword' or 'keyword=value'. @@ -172,12 +173,14 @@ int main (int argc, const char *argv[]) # endif - testingMessage( "Testing CoinModel\n" ); - CoinModelUnitTest(mpsDir,netlibDir,testModel); - + if (netlibDir != "" && mpsDir != "" && testModel != ""){ + testingMessage( "Testing CoinModel\n" ); + CoinModelUnitTest(mpsDir,netlibDir,testModel); + } + testingMessage( "Testing CoinError\n" ); CoinErrorUnitTest(); - + testingMessage( "Testing CoinShallowPackedVector\n" ); CoinShallowPackedVectorUnitTest(); @@ -198,12 +201,14 @@ int main (int argc, const char *argv[]) CoinDenseVectorUnitTest(0.0f); #endif - testingMessage( "Testing CoinMpsIO\n" ); - CoinMpsIOUnitTest(mpsDir); - - testingMessage( "Testing CoinLpIO\n" ); - CoinLpIOUnitTest(mpsDir); + if (mpsDir != ""){ + testingMessage( "Testing CoinMpsIO\n" ); + CoinMpsIOUnitTest(mpsDir); + testingMessage( "Testing CoinLpIO\n" ); + CoinLpIOUnitTest(mpsDir); + } + testingMessage( "Testing CoinMessageHandler\n" ); if (!CoinMessageHandlerUnitTest()) { allOK = false ; }