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:
committed by
Sam Hatchett
parent
63b4438765
commit
bbe40c5ba4
30
appveyor.yml
30
appveyor.yml
@@ -7,7 +7,7 @@
|
||||
# US EPA - ORD/NRMRL
|
||||
#
|
||||
|
||||
version: 2.0.{build}
|
||||
version: 2.0.{build}
|
||||
|
||||
image:
|
||||
- Visual Studio 2013
|
||||
@@ -17,32 +17,42 @@ init:
|
||||
- set EPANET_HOME=%APPVEYOR_BUILD_FOLDER%
|
||||
- set BUILD_HOME=buildprod
|
||||
- set TEST_HOME=tests\epanet-nrtestsuite
|
||||
- set NRTEST_SCRIPT=%EPANET_HOME%\%BUILD_HOME%\packages\nrtest\scripts
|
||||
- set NRTEST_SCRIPT=C:\Python27\Scripts
|
||||
- set GENERATOR="Visual Studio 10 2010"
|
||||
|
||||
cache:
|
||||
- C:\ProgramData\chocolatey\bin -> appveyor.yml
|
||||
- C:\ProgramData\chocolatey\lib -> appveyor.yml
|
||||
- '%BUILD_HOME% -> CMakeLists.txt'
|
||||
- set BOOST_ROOT="C:\\Libraries\\boost"
|
||||
- set BOOST_LIB="C:\\Libraries\\boost\\lib32-msvc-12.0"
|
||||
|
||||
# called after repo clone
|
||||
install:
|
||||
- choco install swig
|
||||
- python -m pip install --src %BUILD_HOME%\packages -r tools\requirements.txt
|
||||
|
||||
# called before build
|
||||
before_build:
|
||||
- mkdir %BUILD_HOME%
|
||||
- cd %BUILD_HOME%
|
||||
- cmake -G %GENERATOR% -DCMAKE_BUILD_TYPE=Release ..
|
||||
- cmake -G %GENERATOR%
|
||||
-DBOOST_ROOT="%BOOST_ROOT%"
|
||||
-DBOOST_LIBRARYDIR="%BOOST_LIB%"
|
||||
-DBoost_USE_STATIC_LIBS="ON" ..
|
||||
|
||||
# run custom build script
|
||||
build_script:
|
||||
- cmake --build . --target runepanet --config Release
|
||||
- cmake --build . --config Release
|
||||
|
||||
before_test:
|
||||
- cd %EPANET_HOME%
|
||||
- python -m pip install -r tools\requirements.txt
|
||||
- tools\gen-config.cmd %EPANET_HOME%\%BUILD_HOME%\bin\Release > %TEST_HOME%\apps\epanet-%APPVEYOR_REPO_COMMIT%.json
|
||||
|
||||
# run custom test script
|
||||
test_script:
|
||||
# run unit tests
|
||||
- cd %BUILD_HOME%\tests
|
||||
- ctest -C Release
|
||||
# run regression tests
|
||||
- cd %EPANET_HOME%
|
||||
- tools\run-nrtest.cmd %NRTEST_SCRIPT% %TEST_HOME% %APPVEYOR_REPO_COMMIT%
|
||||
|
||||
cache:
|
||||
- C:\ProgramData\chocolatey\bin -> appveyor.yml
|
||||
- C:\ProgramData\chocolatey\lib -> appveyor.yml
|
||||
|
||||
Reference in New Issue
Block a user