Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit test framework #50

Merged
108 commits merged into from
Sep 30, 2017
Merged

Unit test framework #50

108 commits merged into from
Sep 30, 2017

Conversation

ghost
Copy link

@ghost ghost commented Sep 28, 2017

This pull requests adds initial unit testing to BeamDyn. This is accomplished through pFUnit, an external xUnit-structured testing framework which is linked to OpenFAST as a git submodule and compiles with CMake. Currently, the following subroutines in BeamDyn.f90 and BeamDyn_Subs.f90 are tested

BD_CrvCompose
BD_CheckRotMat
BD_CrvExtractCrv
BD_CrvMatrixR
BD_CrvMatrixH
ExtractRelativeRotation
BD_InputGlobalLocal
BD_DistrLoadCopy
BD_GravityForce
BD_QPData_mEta_rho
BD_GenerateGLL
BD_GaussPointWeight
BD_diffmtc
BD_InitShpDerJaco

Documentation for unit testing is included in pull request #49. A template unit test is included in the unit_tests directory, and all real tests reside in the module directory. For example, BeamDyn unit tests are stored in modules-local/beamdyn/tests.

This pull requests also improves the usage of the regression test system by adding a level of abstraction to the CTest configuration. More regression tests were added for BeamDyn as well.

Lastly, the CMake configuration was updated to set the install prefix to the more standard use case of openfast/install rather than the default usr/local

Note: this branch sits on top of the documentation work included in pull request #49 so all of those commits are currently listed here. After pull request #49 is merged, this should be resolved and only the feature/bd-instrumentation commits will be listed.

look to the next commit for proper layout, this one is damaged due to too many local changes before issuing the commit
This reverts commit 07d2abe.

# Conflicts:
#	modules-local/beamdyn/src/BeamDyn_Subs.f90
needs tests for cases where
flag = 1
flag = 2
flag = 3
this does not yet correctly test the ExtractRelativeRotation subroutine. At least I dont think it does as its already failing, but it probably would have been evident if that subroutine were incorrect …
still need to test more branches
- invalid rotation matrix
- does the WM formulation have any boundaries?
because the resulting parameterized rotations may not be unique
@ghost ghost self-assigned this Sep 28, 2017
Copy link
Contributor

@HaymanConsulting HaymanConsulting left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the <install.html> link is broken on the /source/testing/index.rst page

@ghost
Copy link
Author

ghost commented Sep 29, 2017

@ghaymanNREL ok I'll update that in the documentation pull request, #49

@ghost ghost dismissed HaymanConsulting’s stale review September 29, 2017 16:48

link fixed in pr #49

@ghost
Copy link
Author

ghost commented Sep 30, 2017

results from the regression test at commit 076466c

Regression test execution completed with these results:
AWT_YFix_WSt                           PASS
AWT_WSt_StartUp_HighSpShutDown         PASS
AWT_YFree_WSt                          PASS
AWT_YFree_WTurb                        PASS
AWT_WSt_StartUpShutDown                PASS
AOC_WSt                                PASS
AOC_YFree_WTurb                        PASS
AOC_YFix_WSt                           PASS
UAE_Dnwind_YRamp_WSt                   PASS
UAE_Upwind_Rigid_WRamp_PwrCurve        PASS
WP_VSP_WTurb_PitchFail                 PASS
WP_VSP_ECD                             PASS
WP_VSP_WTurb                           PASS
WP_Stationary_Linear                   PASS
SWRT_YFree_VS_EDG01                    PASS
SWRT_YFree_VS_EDC01                    PASS
SWRT_YFree_VS_WTurb                    PASS
5MW_Land_DLL_WTurb                     PASS
5MW_OC3Mnpl_DLL_WTurb_WavesIrr         PASS
5MW_OC3Trpd_DLL_WSt_WavesReg           PASS
5MW_OC4Jckt_DLL_WTurb_WavesIrr_MGrowth PASS
5MW_ITIBarge_DLL_WTurb_WavesIrr        PASS
5MW_TLP_DLL_WTurb_WavesIrr_WavesMulti  PASS
5MW_OC3Spar_DLL_WTurb_WavesIrr         PASS
5MW_OC4Semi_WSt_WavesWN                PASS
5MW_Land_BD_DLL_WTurb                  PASS
Total PASSING tests - 26
Total FAILING tests - 0

@ghost ghost merged commit e788b9b into dev Sep 30, 2017
@ghost ghost deleted the feature/bd-instrumentation branch September 30, 2017 20:22
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants