Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
222 commits
Select commit Hold shift + click to select a range
fb6b74e
add the initial regression testing files and script for Test01
rafmudaf May 1, 2017
5eaecd4
enable ctest in through cmake
rafmudaf May 1, 2017
3f11b84
gitignore the install directory
rafmudaf May 1, 2017
d780845
wire shell and python scripts to compare Test01 local and gold standard
rafmudaf May 1, 2017
a9a3d4a
gitignore .pyc
rafmudaf May 1, 2017
1cdb41b
add the cmake and ctest configs to reg_tests
rafmudaf May 1, 2017
d713f83
add sim links to some required data directories
rafmudaf May 1, 2017
ed20dad
cleanup the build/reg_tests directory structure
rafmudaf May 1, 2017
7e5954e
pass the tolerance through to the python script from the cmake config
rafmudaf May 1, 2017
dc82e3e
update the baseline input files and solution files; NOTE: .outb's wer…
rafmudaf May 1, 2017
a8ff7d1
add baseline binary output and required 5MW data directory
rafmudaf May 1, 2017
e5b1188
add required AOC directory
rafmudaf May 1, 2017
92f2949
write out binary .out for all tests
rafmudaf May 1, 2017
9aaed62
include more required files for CertTest cases
rafmudaf May 1, 2017
0d64449
include the sim link for required files in CertTest cases
rafmudaf May 1, 2017
34b0fe0
enable all CertTest cases
rafmudaf May 1, 2017
e04627e
copy the source input files and solution directly from CertTest with …
rafmudaf May 2, 2017
2ef8b90
add more descriptive comments
rafmudaf May 2, 2017
ac3d4df
add more descriptive comment
rafmudaf May 2, 2017
03bd836
set tolerance for windows; code cleanup
rafmudaf May 2, 2017
0b0492c
improve argument validation and error handling
rafmudaf May 2, 2017
f65f07e
bug fix on machine/compiler check
rafmudaf May 2, 2017
ff40c83
remove the extraneous shell script in favor of the python comparison …
rafmudaf May 2, 2017
26726a0
rename pass/fail python script
rafmudaf May 2, 2017
af0f26d
allow comparison of ascii to binary output files
rafmudaf May 2, 2017
fdef7e8
use the compiled binary rather than the installed binary to avoid the…
rafmudaf May 2, 2017
eca7522
extract regression test files to a git submodule
rafmudaf May 2, 2017
a3a85f7
remove executable bit on python script since it will be run by callin…
rafmudaf May 2, 2017
8f35721
Merge branch 'dev' into feature/add-submodule
rafmudaf May 2, 2017
da34aab
added the RegressionTestData repo as a submodule
rafmudaf May 2, 2017
0b4fd2a
bug fix on ctest config
rafmudaf May 2, 2017
9a083e1
bug fix on ctest config
rafmudaf May 2, 2017
11db334
reroute ctest config after including submodule
rafmudaf May 2, 2017
d1dde90
bug fix on ctest directory structure config
rafmudaf May 2, 2017
35bb734
Merge branch 'feature/add-submodule' into dev
rafmudaf May 3, 2017
ea1ff86
update RegressionTestData submodule to its latest HEAD
rafmudaf May 3, 2017
2857c59
update submodule HEAD to latest
rafmudaf May 3, 2017
33f7a50
update the failure exit code to a positive non 0 number -> 1
rafmudaf May 3, 2017
bfd725b
update ctest configuration after regression test directory structure …
rafmudaf May 3, 2017
6805f75
replace bash execution of regression test with a python script to do …
rafmudaf May 4, 2017
8eac312
update submodule to latest HEAD
rafmudaf May 4, 2017
1305b32
add tests 20-26
rafmudaf May 4, 2017
5f4029a
replace unused code from development with a more descriptive TODO
rafmudaf May 4, 2017
0b5dd55
Merge remote-tracking branch 'upstream/dev' into dev
rafmudaf May 4, 2017
6348088
use the cmake intrinsic 'file(COPY' rather than 'execute_process' to …
rafmudaf May 4, 2017
de948b9
reference the regression test script directly in the reg_tests direct…
rafmudaf May 4, 2017
1179730
add better argument checking and error handling; run openfast before …
rafmudaf May 4, 2017
f98ce39
update submodule to latest HEAD
rafmudaf May 4, 2017
b1687a3
update submodule to latest HEAD
rafmudaf May 5, 2017
23d2521
check for Fortran compiler not CXX compiler type in CTest
rafmudaf May 5, 2017
4f80719
remove the Clang check, theres no clang fortran compiler
rafmudaf May 8, 2017
e091ab3
rename RegressionTestData -> r-test in gitmodule
rafmudaf May 8, 2017
4d922dd
remote the RegressionTestData repo from submodules
rafmudaf May 8, 2017
6e6e5f1
add r-test submodule referencing the openfast/r-test repo
rafmudaf May 8, 2017
9e97af9
specify a branch in the r-test submodule
rafmudaf May 8, 2017
edc555c
update CMake input files with new regression test data repo name
rafmudaf May 10, 2017
22f92aa
add ctest config files and the steering script
rafmudaf May 10, 2017
91428d2
gitignore the ctest-build directory
rafmudaf May 10, 2017
a2850ba
remove debug print statement
rafmudaf May 10, 2017
a6d3019
add more genericness to the python scripts to ensure cross platform a…
rafmudaf May 10, 2017
30083a2
add configuration for a local cdash to ctest
rafmudaf May 10, 2017
6bff453
update test list file
rafmudaf May 10, 2017
af5872c
configure the steering script for local cdash and to execute the tests
rafmudaf May 10, 2017
b6109aa
add support for multiple solution sets, and automatically choose the …
rafmudaf May 8, 2017
e946b12
add all certtest cases to the test file
rafmudaf May 10, 2017
aee3904
remove unnecessary configurations in ctestconfig; keep file to suppre…
rafmudaf May 10, 2017
51301bb
customize steering script for only running the test -> remove the bui…
rafmudaf May 10, 2017
b205a62
use a variable for the openfast executable in ctest
rafmudaf May 11, 2017
725678d
check for a given openfast executable when running ctest independently
rafmudaf May 11, 2017
3e8e7fb
add a driver to run ctest independently
rafmudaf May 11, 2017
d27f332
updates for windows support
rafmudaf May 11, 2017
5ec4fb8
convert paths to cmake style
rafmudaf May 11, 2017
12c2039
revert a bug fix that wasnt actually a bug fix
rafmudaf May 11, 2017
6135421
automatically determine the test tolerance and leave the option for u…
rafmudaf May 11, 2017
c1d91d8
Merge branch 'feature/ctest-without-cmake' into feature/goldstandard-…
rafmudaf May 11, 2017
e87545c
fix merge conflicts: move submodule to corresponding feature branch
rafmudaf May 11, 2017
43fc58d
add support for optional system and compiler types to the regression …
rafmudaf May 11, 2017
a769c1f
Merge remote-tracking branch 'upstream/dev' into dev
rafmudaf May 11, 2017
6f91311
rename script to manually execute the regression test
rafmudaf May 11, 2017
37d4dbe
update submodule to latest HEAD; rework scripts for updated submodule
rafmudaf May 11, 2017
647bc5f
upgrade r-test submodule to a feature branch
rafmudaf May 12, 2017
31c1916
move submodule remote off of the openfast repo while in development
rafmudaf May 12, 2017
a845e13
bug fix in parsing input variables
rafmudaf May 12, 2017
8a977cf
update call signature to regression test python script
rafmudaf May 12, 2017
543fdd5
update submodule to latest HEAD
rafmudaf May 12, 2017
b92b7f7
update submodule to latest HEAD
rafmudaf May 12, 2017
649d8ba
extend the timeout to 25 minutes, some of the higher cert test cases …
rafmudaf May 15, 2017
7a134f8
update the doc strings of the python programs to more consistent and …
rafmudaf May 15, 2017
69c35ac
add a README to the reg_tests directory
rafmudaf May 15, 2017
f2856b1
include info on running the regression test in the reg_tests README
rafmudaf May 15, 2017
9d94fe2
add a docstring
rafmudaf May 15, 2017
fcd90ee
typo fixes and updates to the README
rafmudaf May 15, 2017
27dc954
typo fix to the README
rafmudaf May 15, 2017
3c7608c
updates to docstrings and the reg_tests README for better clarity
rafmudaf May 15, 2017
03bb880
update the sphinx documentation with automated testing description an…
rafmudaf May 15, 2017
1f346f6
rename r-test gold standard directory from rhel-intel to linux-intel
rafmudaf May 15, 2017
9724970
better handling for system-compiler combinations that dont exist in g…
rafmudaf May 15, 2017
dfeb059
update submodule to latest HEAD
rafmudaf May 16, 2017
5fbb51d
use intrinsic cmake options for including ctest
rafmudaf May 16, 2017
3ef59e8
use more explicit input argument for python script call; refactor cod…
rafmudaf May 16, 2017
633d7df
remote print statement for debugging
rafmudaf May 16, 2017
b18b924
compile the 5MW ServoDyn controllers when building cmake with tests e…
rafmudaf May 16, 2017
ffbde48
verify that the test data submodule was initialized before building t…
rafmudaf May 16, 2017
95843eb
run cmake's ctest in the ctest-build directory for consistency with s…
rafmudaf May 16, 2017
255fe5c
code and comment refactor
rafmudaf May 16, 2017
fcf10ad
convert the executable path to CMAKE style for cross platform compati…
rafmudaf May 16, 2017
a76a5fc
add README to ctest directory
rafmudaf May 16, 2017
cc44d57
automatically determine archtecture type for input to ServoDyn contro…
rafmudaf May 17, 2017
3e2bc3a
add an input argument check for the test tolerance
rafmudaf May 18, 2017
c03f84d
propagate errors upstream for better error reporting, test the given …
rafmudaf May 18, 2017
003a6b2
handle CYGWIN system name in CMake
rafmudaf May 18, 2017
ca15ed5
print updates in the order they are generated; check for valid execut…
rafmudaf May 18, 2017
1fbc8bd
add a print statement for the pass-fail script command
rafmudaf May 19, 2017
75787d2
use a norm rather than variance with an input tolerance to determine …
rafmudaf May 19, 2017
66e9c67
update config file path to use CTest intrinsic variables rather than …
rafmudaf May 22, 2017
587660b
update the comments and README documentation with links, more clear l…
rafmudaf May 22, 2017
044e4f7
update comment
rafmudaf May 22, 2017
a3eeb7d
update README with new scheme determining pass/fail in the regression…
rafmudaf May 22, 2017
1d85041
remove deprecated code
rafmudaf May 23, 2017
5d892f7
update python scripts to Python 3 syntax
rafmudaf May 23, 2017
a78ad74
find the highest python interpreter available in CMake and use it for…
rafmudaf May 23, 2017
85de90d
update all python call signatures in documentation to python3; update…
rafmudaf May 23, 2017
d44fdb1
update submodule to latest HEAD
rafmudaf May 23, 2017
352bc47
update the readthedocs test documentation to reflect an updated pass/…
rafmudaf May 23, 2017
ddd75cd
update the regression test readthedocs with more clear language
rafmudaf May 23, 2017
fa79010
configure reg_tests as a cmake subproject so it can be built independ…
rafmudaf May 24, 2017
a1a8abf
update python program after changes to cmake driver; accept more expl…
rafmudaf May 24, 2017
09f5368
update submodule to latest HEAD
rafmudaf May 24, 2017
b8f221e
remove deprecated ctest standalone configuration files
rafmudaf May 24, 2017
adb6184
remove deprecated python ctest driver
rafmudaf May 24, 2017
e0a1619
add license summary to the top of source code
rafmudaf May 24, 2017
5ad56fb
update the documentation after regression test rework
rafmudaf May 24, 2017
c8dc8e6
update readthedocs with better instructions on building the full targ…
rafmudaf May 26, 2017
28fd861
Convert CMAKE style path to NATIVE before using in CTest
rafmudaf May 26, 2017
739a8af
Convert CMAKE paths to NATIVE in the test config file
rafmudaf May 31, 2017
b5c21a0
attempt to compile the servodyn controllers with make only in *nix sy…
rafmudaf May 31, 2017
79630d0
update r-test submodule to include updates for ServoDyn controller co…
rafmudaf May 31, 2017
1957185
move servodyn controller static makefiles to cmake projects
rafmudaf May 31, 2017
78a8ac4
move the python libraries for regression test to a lib/ directory
rafmudaf Jun 1, 2017
2e602c5
add the beamdyn executable option
rafmudaf Jun 2, 2017
d796821
move openfast execution script to the /lib directory
rafmudaf Jun 2, 2017
312c55f
add a beamdyn case execution script
rafmudaf Jun 2, 2017
e4b78e0
rename regression test script to denote its association with the open…
rafmudaf Jun 2, 2017
0775725
update submodule for module level reorganization
rafmudaf Jun 2, 2017
d989e76
add the regression test script for beamdyn
rafmudaf Jun 2, 2017
00d4934
add a ctest function for beamdyn regression
rafmudaf Jun 2, 2017
3879734
add openfast regression testing to updated ctest setup
rafmudaf Jun 2, 2017
359d3b6
bug fixes and updates for consistency in regression test scripts
rafmudaf Jun 2, 2017
9b8b95b
store the "lib" directory in a variable
rafmudaf Jun 2, 2017
317641d
add the pass fail check to the beamdyn regression test script
rafmudaf Jun 2, 2017
8922c71
add all 26 cert test cases to the openfast reg test
rafmudaf Jun 2, 2017
caf7355
update path for servodyn compiler script
rafmudaf Jun 2, 2017
8976da7
update the ctest config to submit to public cdash site
rafmudaf Jun 2, 2017
ad3f914
increase the default timeout for each test; test case 21 takes a while
rafmudaf Jun 3, 2017
7264b01
grammar update
rafmudaf Jun 3, 2017
b702474
update the cmake config for updated r-test directory structure
rafmudaf Jun 6, 2017
f1d195d
update python regression test scripts for updated r-test directory st…
rafmudaf Jun 6, 2017
5703fac
use recursive method
rafmudaf Jun 6, 2017
ece57c8
add rich labels to each test function
rafmudaf Jun 7, 2017
49af3b1
leave testing OFF by default
rafmudaf Jun 7, 2017
1ceb2fa
update the ctest executable variables with a "ctest" prefix
rafmudaf Jun 7, 2017
e99bdca
simplify the search for python interpreter
rafmudaf Jun 7, 2017
b5fba07
only compile the servo dyn controllers if they don't already exist
rafmudaf Jun 7, 2017
cafbb5e
add more ctest labels to the regression test cases
rafmudaf Jun 7, 2017
cda8669
update submodule to its latest head
rafmudaf Jun 7, 2017
614e7b6
add openfast label to openfast regression tests
rafmudaf Jun 8, 2017
c6f7dd4
Merge remote-tracking branch 'upstream/dev' into dev
rafmudaf Jun 8, 2017
c169942
update submodule to latest HEAD
rafmudaf Jun 8, 2017
5166c63
update submodule
rafmudaf Jun 8, 2017
42df2e9
update pass_fail.py to return more informative output
Jun 9, 2017
b649485
Merge pull request #1 from mschmidt271/dev
rafmudaf Jun 9, 2017
aa600fb
use updated r-test directory structure
rafmudaf Jun 14, 2017
6a00d79
update submodule with latest baseline openfast solutions
rafmudaf Jun 15, 2017
812c5b2
replace cmake escape character with double backslash
rafmudaf Jun 15, 2017
053a454
replace cmake escape character with double backslash
rafmudaf Jun 15, 2017
1d13f47
update r-test submodule to latest HEAD
rafmudaf Jun 16, 2017
a1acd4d
add a filter to the copy command to prevent copying baseline solutions
rafmudaf Jun 20, 2017
468dc47
update baseline solutions
rafmudaf Jun 20, 2017
8f39198
update linux-intel baseline files based on openfast/dev commit d329d01
rafmudaf Jun 22, 2017
82ae7e6
increase the time limit property on tests; Test21 times out
rafmudaf Jun 23, 2017
e386d8c
replace the include statement with the more appropriate add_subdirectory
rafmudaf Jun 27, 2017
dca0c15
build and seed the test directories in the build directory so paralle…
rafmudaf Jun 28, 2017
9bd7ca8
update doc string and in line documentation
rafmudaf Jun 28, 2017
b5b6d1e
update reg_tests README after directory structure updates
rafmudaf Jun 28, 2017
964797e
update doxygen after major changes to the test procedure
rafmudaf Jun 28, 2017
6c8d2f8
bug fix in documentation: add "lib/" to files in lib directory
rafmudaf Jun 29, 2017
c867bc9
documentation update
rafmudaf Jun 30, 2017
93a4514
add windows machine type option
rafmudaf Jun 30, 2017
4f9a9bc
rename CMAKE_BUILD_DIR to CMAKE_BINARY_DIR
rafmudaf Jun 30, 2017
2ced8f5
include the discon controller cmake projects in the openfast cmake pr…
rafmudaf Jun 30, 2017
98f0720
revert to "include" rather than "add_subdirectory" due to ctest confi…
rafmudaf Jun 30, 2017
0b1a3d7
update submodule for discon cmake updates
rafmudaf Jun 30, 2017
dcf6729
Merge remote-tracking branch 'upstream/dev' into dev
rafmudaf Jun 30, 2017
92563e8
better path parsing for creating the output log
rafmudaf Jul 5, 2017
5a7267e
add a temporary python script to manually execute the regression test…
rafmudaf Jul 5, 2017
fcb28e6
add documentation to manual execution script
rafmudaf Jul 5, 2017
fc8254a
Store the python executable for future python calls
rafmudaf Jul 5, 2017
e2fd956
run all 26 cases in the manual script
rafmudaf Jul 5, 2017
b06c761
update macos-gnu baseline files based on openfast/dev commit d329d01
rafmudaf Jul 6, 2017
829c1a2
bug fix for the default openfast and beamdyn_driver executables in cm…
rafmudaf Jul 7, 2017
f4387b0
update r-test submodule with new test case names; update reg test too…
rafmudaf Jul 7, 2017
aa1cb06
update r-test submodule to get new cmake configuration of servodyn co…
rafmudaf Jul 7, 2017
27204bc
bug fixes for python3 support
rafmudaf Jul 11, 2017
2fa5ffd
update r-test to include initial baseline generation script
rafmudaf Jul 11, 2017
93726a0
Merge remote-tracking branch 'upstream/dev' into dev
rafmudaf Jul 12, 2017
cb9b805
update the reg test build directory setup for windows workflow
rafmudaf Jul 12, 2017
04dc708
update status reporting at end of test
rafmudaf Jul 12, 2017
f7b2547
update submodule to latest HEAD
rafmudaf Jul 12, 2017
5c3105f
add a branch in the if statement to copy the 5MW turbine dirctory whe…
rafmudaf Jul 12, 2017
8cced69
update submodule to latest HEAD
rafmudaf Jul 12, 2017
fa79a84
documentation updates
rafmudaf Jul 13, 2017
f8b97d8
add mailto to Mike's email address; link the github repo
rafmudaf Jul 13, 2017
bf86c55
update readthedocs with new procedures and information after latest u…
rafmudaf Jul 13, 2017
50cc073
remove a broken link to module documentation
rafmudaf Jul 13, 2017
df70917
get the case list from an external input file
rafmudaf Jul 17, 2017
8e1403b
update r-test submodule to get latest automated scripts for running a…
rafmudaf Jul 17, 2017
7305860
update ctest list with new case names
rafmudaf Jul 18, 2017
3848675
get the latest baseline solutions from git submodule
rafmudaf Jul 19, 2017
1bb7498
add ctest tolerance as a user specified cmake option
rafmudaf Jul 20, 2017
41a75e6
allow a user specified tolerance in manual reg test
rafmudaf Jul 20, 2017
0f9941f
ignore cases commented in the case list
rafmudaf Jul 20, 2017
8af77d5
reconfigure openfast to use openfast/r-test instead of rafaelmudafort…
rafmudaf Jul 20, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@
*.exe
*.out
*.app
*.pyc

# CMake specific files
build/**/*
install/*
ctest-build/*

vs-build
build
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "reg_tests/r-test"]
path = reg_tests/r-test
url = https://github.com/openfast/r-test.git
branch = dev
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,15 @@ endforeach(IDIR IN ITEMS ${FAST_MODULES_EXTERNAL})

option(BUILD_DOCUMENTATION "Build documentation." OFF)
if(BUILD_DOCUMENTATION)
add_subdirectory(docs)
add_subdirectory(docs)
endif()

option(BUILD_TESTING "Build the testing tree." OFF)
if(BUILD_TESTING)
# add_subdirectory(reg_tests) this should be 'include'. with add_subdirectory,
# the CTestTestlist.cmake file is placed in the reg_tests subdirectory
# and cannot be found by ctest
include(reg_tests/CMakeLists.txt)
endif()

add_subdirectory(glue-codes)
Expand Down
19 changes: 19 additions & 0 deletions CTestConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
##
## # The following are required to submit to the CDash dashboard:
## ENABLE_TESTING()
## INCLUDE(CTest)

set(CTEST_PROJECT_NAME "openfast")
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

set(CTEST_DROP_METHOD http)
set(CTEST_DROP_SITE "my.cdash.org")
set(CTEST_DROP_LOCATION "/submit.php?project=OpenFAST")
set(CTEST_DROP_SITE_CDASH TRUE)

# saved for debugging
#set(CTEST_DROP_SITE "localhost")
#set(CTEST_DROP_LOCATION "/cdash/public/submit.php?project=openfast")
18 changes: 11 additions & 7 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
.. OpenFAST documentation master file, created by
sphinx-quickstart on Wed Jan 25 13:52:07 2017.

OpenFAST Documentation
OpenFAST Documentation
======================

This page is under construction. Our intention is that this page will eventually host documents on compiling OpenFAST, theory behind OpenFAST, software-development requirements, reporting issues, etc.
This page is under construction. Our intention is that this page will eventually host
documents on compiling OpenFAST, theory behind OpenFAST, software-development
requirements, reporting issues, etc.

Please contact Michael.A.Sprague@NREL.gov with questions regarding the OpenFAST development plan.
Please contact `Michael.A.Sprague@NREL.gov <mailto:Michael.A.Sprague@NREL.gov>`_. with questions regarding the OpenFAST
development plan.

For possible bugs, enhancement requests, or code questions, please submit an issues at the OpenFAST Github repository https://github.com/OpenFAST/OpenFAST
For possible bugs, enhancement requests, or code questions, please submit an issues at
the `OpenFAST Github repository <https://github.com/OpenFAST/OpenFAST>`__.

Users may find the established FAST8 through the NWTC Information Portal: https://nwtc.nrel.gov/
Users may find the established FAST8 through the NWTC Information Portal:
https://nwtc.nrel.gov/

.. toctree::
:maxdepth: 2

OpenFAST Github Organization Page <https://github.com/OpenFAST>
OpenFAST Github Repository <https://github.com/OpenFAST/OpenFAST>
Installing OpenFAST <source/install.rst>
Module Documentation <source/module.rst>
Testing OpenFAST <source/test.rst>
Source Code Documentation <source/code.rst>
Building this Documentation Locally <source/build_doc.rst>

60 changes: 60 additions & 0 deletions docs/source/test.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
Testing OpenFAST
================

The OpenFAST test suite consists of system and module level regression tests and
unit tests. The regression test compares locally generated solutions to a set of
baseline solutions. The unit tests ensure that individual subroutines are
functioning as intended.

All of the necessary files corresponding to the regression test are contained in
the ``reg_tests`` directory. The unit test framework is housed in ``unit_tests``
while the actual tests are contained in the directory corresponding to the tested
module.

Dependencies
------------
- Python 2.7/3+
- Numpy
- CMake and CTest (Optional in regression test)

Configuring the test suite
--------------------------
A portion of the test suite is linked to the OpenFAST repository through
``git submodule``. Specifically,

- `r-test <https://github.com/openfast/r-test>`__
- `pFUnit <http://pfunit.sourceforge.net>`__

Be sure to clone the repo with the ``--recursive`` flag or execute
``git submodule update --init --recursive`` after cloning.

The test suite can be built with `CMake <https://cmake.org/>`__ similar to
OpenFAST. The default CMake configuration is useful, but may need customization
for particular build environments. CMake variables can be configured in the `CMake
GUI <https://cmake.org/download/>`__ or through the command line interface with
the command ``ccmake``. If the entire OpenFAST package is to be built, the test
related CMake variables can be configured during the OpenFAST CMake
configuration. However, if only the test suite will be built, configure CMake
using the ``reg_tests`` project with ``ccmake path/to/reg_tests`` or selecting
``reg_tests`` as the source directory in the CMake GUI.

The test specific CMake variables are

- BUILD_TESTING
- CTEST_OPENFAST_EXECUTABLE
- CTEST_[MODULE]_EXECUTABLE

Look at the `Installing OpenFAST <install.html>`__ page for more details on
configuring the CMake targets.

While the unit tests must be built with CMake due to its external dependencies,
the regression test may be executed without building with CMake. See the
`regression test <test/regression_test.html>`__ section for more info.

Test specific documentation
---------------------------
.. toctree::
:maxdepth: 2

Unit Test <test/unit_test.rst>
Regression Test <test/regression_test.rst>
119 changes: 119 additions & 0 deletions docs/source/test/regression_test.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
Regression test
===============

The regression test executes a series of test cases which fully describe
OpenFAST and its module's capabilities. Each locally computed result is compared
to a static set of baseline results. To account for machine and compiler
differences, the regression test attempts to match the current machine and
compiler type to the appropriate solution set from these combinations

- macOS with GNU compiler (default)
- Red Hat Enterprise Linux with Intel compiler
- Windows with Intel compiler

The automated regression test runs
`CTest <https://cmake.org/Wiki/CMake/Testing_With_CTest>`__ and can be executed
by running either of the commands ``make test`` or ``ctest`` from the build
directory. If the entire OpenFAST package is to be built, CMake will configure
CTest to find the new binary at ``openfast/build/glue-codes/fast/openfast``.
However, if the intention is to build only the test suite, the OpenFAST binary
should be specified in the CMake configuration under the ``CTEST_OPENFAST_EXECUTABLE``
flag. There is also a corresponding ``CTEST_[MODULE]_NAME`` flag for each module
included in the regression test.

The regression test can be executed manually with the included driver
``reg_tests/manualRegressionTest.py``.

In both modes of execution a subdirectory is created in the build directory
called ``reg_tests`` where all of the input files for the test cases are copied
and all of the locally generated outputs are stored.

Ultimately, both CTest and the manual execution script call a series of Python
scripts in ``reg_tests`` and ``reg_tests/lib``. One such script is ``lib/pass_fail.py``
which reads the output files and computes a norm on each channel reported.
If the maximum norm is greater than a predetermined tolerance, that particular
test is reported as failed. The failure criteria is outlined in pseudocode below.

::

for j in range(nChannels)
norm_diff[j] = L2norm(localSolution[j]-baselineSolution[j])
rms_baseline[j] = L2norm(baselineSolution[j])

norm = norm_diff / rms_baseline

if max(norm) < tolerance:
success

Running the regression test with CTest
--------------------------------------
When driven by CTest, the regression test can be executed by running various
forms of the command ``ctest`` from the build directory. The basic commands are

- ``ctest`` - Run the entire regression test
- ``ctest -V`` - Run the entire regression test with verbose output
- ``ctest -R [TestName]`` - Run a test by name
- ``ctest -j [N]`` - Run all tests with N tests executing in parallel

Each regression test case contains a series of labels associating all of the
modules used. The labeling can be seen in the test instantiation in
``reg_tests/CTestList.cmake`` and called directly with

- ``ctest -L [Label]``

These flags can be compounded making useful variations of ``ctest`` such as

- ``ctest -V -L aerodyn14`` - Runs all cases that use AeroDyn14 with verbose output
- ``ctest -j 16 -L aerodyn14`` - Runs all cases that use AeroDyn14 in 16 concurrent processes
- ``ctest -V -R 5MW_DLL_Potential_WTurb`` - Runs the case with name "5MW_DLL_Potential_WTurb"

Regression test from scratch
----------------------------

- Build OpenFAST and the test suite

::

git clone --recursive https://github.com/openfast/openfast.git
cd openfast/reg_tests/r-tests/openfast
python compileDISCON.py
cd ../../
mkdir build && cd build
# Configure CMake - BUILD_TESTING, CTEST_OPENFAST_EXECUTABLE, CTEST_[MODULE]_EXECUTABLE
cmake ..
make
ctest


- Build only the test suite

::

git clone --recursive https://github.com/openfast/openfast.git
cd openfast/reg_tests/r-tests/openfast
python compileDISCON.py
cd ../../
mkdir build && cd build
# Configure CMake - CTEST_OPENFAST_EXECUTABLE, CTEST_[MODULE]_EXECUTABLE
cmake ../reg_tests
ctest

- `Windows with Visual Studio regression test <regression_test_windows.html>`__

Follow the link above for a detailed procedure. It is summarized below though
excluding the procedure to build OpenFAST itself.

::

git clone --recursive https://github.com/openfast/openfast.git
cd openfast

## Build the ServoDyn external controller libraries
# Open the Visual Studio Solution (DISCON.sln) located in ``openfast\vs-build\DISCON``
# Choose Release and x64 for the Solutions Configuration and Solutions Platform
# Build Solution

## Execute the OpenFAST regression Tests
# Open a command prompt which is configured for Python (like Anaconda)
cd openfast\reg_tests
python manualRegressionTest.py ..\build\bin\FAST_x64.exe Windows Intel
81 changes: 81 additions & 0 deletions docs/source/test/regression_test_windows.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
Running OpenFAST Regression Tests on Windows
============================================

| 1) Clone the openfast repo and initialize the testing database
| a) Open a git command shell window [like git bash]
| b) Change your working directory to the location above where you want your local repo to be located [the repo will be placed into a folder called openfast at this location]
| c) Type: git clone https://github.com/openfast/openfast.git [this creates a local version of the openfast repo on your computer]
| You should see something like this:
| Cloning into 'openfast'...
| remote: Counting objects: 23801, done.
| remote: Compressing objects: 100% (80/80), done.
| remote: Total 23801 (delta 73), reused 102 (delta 50), pack-reused 23670
| Receiving objects: 100% (23801/23801), 92.10 MiB | 18.99 MiB/s, done.
| Resolving deltas: 100% (13328/13328), done.
| Checking connectivity... done.
| d) Type: cd openfast [change your working directory to the openfast folder]
| e) Type: git checkout dev [this places your local repo on the correct branch of the openfast repo]
| f) Type: git submodule update --init --recursive [this downloads the testing database to your computer]
| You should see something like this:
| Submodule 'reg_tests/r-test' (https://github.com/openfast/r-test.git) registered for path 'reg_tests/r-test'
| Cloning into 'reg_tests/r-test'...
| remote: Counting objects: 3608, done.
| remote: Compressing objects: 100% (121/121), done.
| remote: Total 3608 (delta 22), reused 161 (delta 21), pack-reused 3442
| Receiving objects: 100% (3608/3608), 154.52 MiB | 26.29 MiB/s, done.
| Resolving deltas: 100% (2578/2578), done.
| Checking connectivity... done.
| Submodule path 'reg_tests/r-test': checked out 'b808f1f3c1331fe5d03c5aaa4167532c2492d378'


| 2) Build The Regression Testing DISCON DLLs
| a) Open the Visual Studio Solution (DISCON.sln) located in openfast\vs-build\DISCON folder
| b) Choose Release and x64 for the Solutions Configuration and Solutions Platform, respectively
| c) From the menu bar select Build->Build Solution
| d) You should now see the files DISCON.dll, DISCON_ITIBarge.dll, and DISCON_OC4.dll in your openfast\build\reg_tests\openfast\5MW_Baseline\ServoData folder


| 3) Build OpenFAST using Visual Studio
| a) Open the Visual Studio Solution (FAST.sln) located in openfast\vs-build\FAST folder
| b) Choose Release and x64 for the Solutions Configuration and Solutions Platform, respectively
| c) From the menu bar select Build->Build Solution
| i) If this is the first time you have tried to build openfast, you will get build errors!!! [continue to steps (ii) and (iii), otherwise if FAST builds successfully, continue to step (3d) ]
| ii) Cancel build using the menubar Build->Cancel
| [ VS is confused about the build-order/dependency of the project files in FASTlib., but canceling and restarting VS, it somehow as enough info from the partial build to get this right, now]
| iii) Close your Visual Studio and then Repeat Steps (a) through (c)
| d) You should now see the file FAST_x64.exe in your openfast\build\bin folder


| 4) Execute the OpenFAST regression Tests
| a) Open a command prompt which is configured for Python [ like Anaconda3 ]
| b) Change your working directory to openfast\reg_tests
| c) Type: python manualRegressionTest.py ..\build\bin\FAST_x64.exe Windows Intel
| You should see this: executing case AWT_YFix_WSt
| d) The tests will continue to execute one-by-one until you finally see something like this:
| ('AWT_YFix_WSt', 'FAIL')
| ('AWT_WSt_StartUp_HighSpShutDown', 'FAIL')
| ('AWT_YFree_WSt', 'FAIL')
| ('AWT_YFree_WTurb', 'FAIL')
| ('AWT_WSt_StartUpShutDown', 'FAIL')
| ('AOC_WSt', 'FAIL')
| ('AOC_YFree_WTurb', 'FAIL')
| ('AOC_YFix_WSt', 'FAIL')
| ('UAE_YRamp_WSt', 'FAIL')
| ('UAE_Rigid_WRamp_PwrCurve', 'FAIL')
| ('WP_VSP_WTurb_PitchFail', 'FAIL')
| ('WP_VSP_ECD', 'FAIL')
| ('WP_VSP_WTurb', 'FAIL')
| ('WP_Stationary_Linear', 'PASS')
| ('SWRT_YFree_VS_EDG01', 'FAIL')
| ('SWRT_YFree_VS_EDC01', 'FAIL')
| ('SWRT_YFree_VS_WTurb', 'FAIL')
| ('5MW_DLL_Potential_WTurb', 'FAIL')
| ('5MW_DLL_Potential_WTurb_WavesIrr', 'FAIL')
| ('5MW_DLL_Potential_WSt_WavesReg', 'FAIL')
| ('5MW_DLL_Potential_WTurb_WavesIrrFixedYawGrowth', 'FAIL')
| ('5MW_DLL_WTurb_WavesIrr', 'FAIL')
| ('5MW_DLL_WTurb_WavesIrr_WavesMulti', 'FAIL')
| ('5MW_DLL_WTurb_WavesIrr', 'FAIL')
| ('5MW_WSt_WhiteNoise_OC4', 'FAIL')
| ('5MW_BD_DLL_Potential_WTurb', 'FAIL')
| e) If an individual test succeeds you will see 'PASS' otherwise you will see 'FAIL' after that test's name
4 changes: 4 additions & 0 deletions docs/source/test/unit_test.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Unit test
=========

Coming soon
Loading