Feature unittest (#157)

* Adding support for unit testing using boost unit test and ctest

* Adding libboost-test to Travis config.

* Adding libboost-test to Travis config.

* Modifying per element comparison

* Modifying per element comparison

* Fixing typo

* Fixing typo

* Adding custom comparison for strings

* Updating Travis to run unit tests

* Updating Travis to run unit tests

* Fixing typo

* Preparing unit testing to run on Appveyor

* Preparing unit testing to run on Appveyor

* Preparing unit testing to run on Appveyor

* Preparing unit testing to run on Appveyor and Travis

* Preparing unit testing to run on Appveyor and Travis

* Preparing unit testing to run on Appveyor and Travis

* Preparing unit testing to run on Appveyor

* Preparing unit testing to run on Appveyor

* Fixing unit testing path issue in CMake

* Fixing unit testing path issue in CMake

* Fixing bugs in cmake and appveyor scripts

* Rolling back generate_export_header in cmake
This commit is contained in:
Michael Tryby
2018-03-21 14:10:10 -04:00
committed by Sam Hatchett
parent 63b4438765
commit bbe40c5ba4
11 changed files with 520 additions and 30 deletions

View File

@@ -3,15 +3,15 @@ language: python
env:
global:
- EPANET_HOME=`pwd`
- BUILD_HOME=buildproducts
- BUILD_HOME=buildprod
- TEST_HOME=tests/epanet-nrtestsuite
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y libboost-test-dev
- sudo apt-get install -y swig
install:
- pip install --src build/packages -r tools/requirements.txt
#install:
before_script:
- mkdir -p $BUILD_HOME
@@ -19,7 +19,12 @@ before_script:
- cmake ..
script:
- make
- cmake --build .
# run unit tests
- cd tests
- ctest
# run regression tests
- cd $EPANET_HOME
- pip install -r tools/requirements.txt
- tools/gen-config.sh $EPANET_HOME/$BUILD_HOME/bin > $TEST_HOME/apps/epanet-$TRAVIS_COMMIT.json
- tools/run-nrtest.sh $TEST_HOME $TRAVIS_COMMIT