Configure appveyor (#142)
with much appreciation to @michaeltryby 🎉
* Initial commit getting Appveyor running
* Modifying branch built
* Modifying generator
* Modifying path to test scripts
* Modifying path to test scripts
* Configuring appveyor cache to store cmake generated build files
* suppressing insecure string warnings
* Fixing typo
* Fixing problem with cmake build invocation
* Changing CMake to Linux build on Travis
* Adding compiler flags for MSVC
* Adding Appveyor build status badge
* Adding Appveyor build status badge
* Adding include directory so it is available to project files
* cleaning cache
* rebuilding cache
This commit is contained in:
committed by
Sam Hatchett
parent
d2503bc035
commit
47733feb74
29
tools/gen-config.cmd
Normal file
29
tools/gen-config.cmd
Normal file
@@ -0,0 +1,29 @@
|
||||
::
|
||||
:: gen-config.cmd - Generated nrtest app configuration file for test executable
|
||||
::
|
||||
:: Date Created: 1/8/2018
|
||||
::
|
||||
:: Author: Michael E. Tryby
|
||||
:: US EPA - ORD/NRMRL
|
||||
::
|
||||
:: Arguments:
|
||||
:: 1 - absolute path to test executable (valid path seperator for nrtest is "/")
|
||||
::
|
||||
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
:: process path to remove quotes and convert backward to forward slash
|
||||
set ABS_BUILD_PATH=%~1
|
||||
set ABS_BUILD_PATH=%ABS_BUILD_PATH:\=/%
|
||||
|
||||
:: this is the target created by the cmake build script
|
||||
set TEST_CMD=runepanet.exe
|
||||
|
||||
echo {
|
||||
echo "name" : "epanet",
|
||||
echo "version" : "",
|
||||
echo "description" : "",
|
||||
echo "setup_script" : "",
|
||||
echo "exe" : "%ABS_BUILD_PATH%/%TEST_CMD%"
|
||||
echo }
|
||||
46
tools/run-nrtest.cmd
Normal file
46
tools/run-nrtest.cmd
Normal file
@@ -0,0 +1,46 @@
|
||||
::
|
||||
:: run_nrtest.cmd - Runs numerical regression test
|
||||
::
|
||||
:: Date Created: 1/8/2018
|
||||
::
|
||||
:: Author: Michael E. Tryby
|
||||
:: US EPA - ORD/NRMRL
|
||||
::
|
||||
:: Arguments:
|
||||
:: 1 - nrtest script path
|
||||
:: 2 - test suite path
|
||||
:: 3 - version/build identifier
|
||||
::
|
||||
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set NRTEST_SCRIPT_PATH=%~1
|
||||
set TEST_SUITE_PATH=%~2
|
||||
|
||||
set NRTEST_EXECUTE_CMD=python %NRTEST_SCRIPT_PATH%\nrtest execute
|
||||
set TEST_APP_PATH=apps\epanet-%3.json
|
||||
set TESTS=tests\examples
|
||||
set TEST_OUTPUT_PATH=benchmark\epanet-%3
|
||||
|
||||
set NRTEST_COMPARE_CMD=python %NRTEST_SCRIPT_PATH%\nrtest compare
|
||||
set REF_OUTPUT_PATH=benchmark\epanet-2012
|
||||
set RTOL_VALUE=0.1
|
||||
set ATOL_VALUE=0.0
|
||||
|
||||
:: change current directory to test suite
|
||||
cd %TEST_SUITE_PATH%
|
||||
|
||||
:: if present clean test benchmark results
|
||||
if exist %TEST_OUTPUT_PATH% (
|
||||
rmdir /s /q %TEST_OUTPUT_PATH%
|
||||
)
|
||||
|
||||
echo INFO: Creating test benchmark
|
||||
set NRTEST_COMMAND=%NRTEST_EXECUTE_CMD% %TEST_APP_PATH% %TESTS% -o %TEST_OUTPUT_PATH%
|
||||
:: if there is an error exit the script with error value 1
|
||||
%NRTEST_COMMAND% || exit /B 1
|
||||
|
||||
echo INFO: Comparing test and ref benchmark
|
||||
set NRTEST_COMMAND=%NRTEST_COMPARE_CMD% %TEST_OUTPUT_PATH% %REF_OUTPUT_PATH% --rtol %RTOL_VALUE% --atol %ATOL_VALUE%
|
||||
%NRTEST_COMMAND%
|
||||
Reference in New Issue
Block a user