From 33a02f1bfce1b659ccc6872fd8cd47d48e0fffdb Mon Sep 17 00:00:00 2001 From: Ganesh Vijayakumar Date: Thu, 8 Aug 2024 17:36:42 -0600 Subject: [PATCH] Add C++ API test with restart for extloads --- reg_tests/CTestList.cmake | 2 +- reg_tests/executeOpenfastCppRegressionCase.py | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/reg_tests/CTestList.cmake b/reg_tests/CTestList.cmake index a88f6b721..46d2f37a1 100644 --- a/reg_tests/CTestList.cmake +++ b/reg_tests/CTestList.cmake @@ -319,7 +319,7 @@ of_regression("Tailfin_FreeYaw1DOF_Unsteady" "openfast;elastodyn;aerod of_aeromap_regression("5MW_Land_AeroMap" "aeromap;elastodyn;aerodyn15") # OpenFAST C++ API test -if(BUILD_OPENFAST_CPP_API) +if(BUILD_OPENFAST_CPP_DRIVER) of_cpp_interface_regression("5MW_Land_DLL_WTurb_cpp" "openfast;fastlib;cpp") of_cpp_interface_regression("5MW_Restart" "openfast;fastlib;cpp;restart") endif() diff --git a/reg_tests/executeOpenfastCppRegressionCase.py b/reg_tests/executeOpenfastCppRegressionCase.py index 2ba9f9094..ab5e6ccf0 100644 --- a/reg_tests/executeOpenfastCppRegressionCase.py +++ b/reg_tests/executeOpenfastCppRegressionCase.py @@ -112,7 +112,18 @@ if returnCode != 0: sys.exit(returnCode*10) os.chdir(cwd) - + + +### If this is a restart test case +if caseName.endswith('_Restart'): + for caseInputFile in reversed(glob.glob(os.path.join(testBuildDirectory, '*chkp'))): + if not caseInputFile.endswith('dll.chkp'): + break + caseInputFile = os.path.abspath("cDriverRestart.yaml") + returnCode = openfastDrivers.runOpenfastCase(caseInputFile, executable, restart=True) + if returnCode != 0: + sys.exit(returnCode*10) + ### Build the filesystem navigation variables for running the regression test localOutFile = os.path.join(testBuildDirectory, caseName + ".outb") baselineOutFile = os.path.join(targetOutputDirectory, caseName.replace('_cpp', '') + ".outb")