Skip to content

Commit 2d0357e

Browse files
committed
wavetank regression: rearrange again for GH actions
1 parent f305048 commit 2d0357e

File tree

2 files changed

+13
-21
lines changed

2 files changed

+13
-21
lines changed

reg_tests/executeWavetankPyRegressionCase.py

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
import pass_fail
3838
from errorPlotting import exportCaseSummary
3939

40+
##### Helper functions
41+
excludeExt=['.out','.outb','.ech','.yaml','.sum','.log']
42+
4043
##### Main program
4144

4245
### Store the python executable for future python calls
@@ -80,6 +83,8 @@
8083
inputsDirectory = os.path.join(moduleDirectory, caseName)
8184
targetOutputDirectory = os.path.join(inputsDirectory)
8285
testBuildDirectory = os.path.join(buildDirectory, caseName)
86+
87+
dependsDir = os.path.join("..", "..", "openfast", "MHK_RM1_Floating_Tank-scaled")
8388

8489
# verify all the required directories exist
8590
if not os.path.isdir(rtest):
@@ -92,26 +97,13 @@
9297
# create the local output directory if it does not already exist
9398
# and initialize it with input files for all test cases
9499
if not os.path.isdir(testBuildDirectory):
95-
os.makedirs(testBuildDirectory)
96-
for file in glob.glob(os.path.join(inputsDirectory,"*py")):
97-
filename = file.split(os.path.sep)[-1]
98-
shutil.copy(os.path.join(inputsDirectory,filename), os.path.join(testBuildDirectory,filename))
99-
for file in glob.glob(os.path.join(inputsDirectory,"*in")):
100-
filename = file.split(os.path.sep)[-1]
101-
shutil.copy(os.path.join(inputsDirectory,filename), os.path.join(testBuildDirectory,filename))
102-
for file in glob.glob(os.path.join(inputsDirectory,"*Elev")):
103-
filename = file.split(os.path.sep)[-1]
104-
shutil.copy(os.path.join(inputsDirectory,filename), os.path.join(testBuildDirectory,filename))
105-
for file in glob.glob(os.path.join(inputsDirectory,"*dat")):
106-
filename = file.split(os.path.sep)[-1]
107-
shutil.copy(os.path.join(inputsDirectory,filename), os.path.join(testBuildDirectory,filename))
108-
for file in glob.glob(os.path.join(inputsDirectory,"*tdms")):
109-
filename = file.split(os.path.sep)[-1]
110-
shutil.copy(os.path.join(inputsDirectory,filename), os.path.join(testBuildDirectory,filename))
111-
src = os.path.join(inputsDirectory, "Airfoils")
112-
dst = os.path.join(testBuildDirectory, "Airfoils")
113-
if not os.path.isdir(dst):
114-
rtl.copyTree(src, dst)
100+
rtl.copyTree(inputsDirectory, testBuildDirectory, excludeExt)
101+
102+
# Dependency
103+
src = os.path.join(inputsDirectory, dependsDir)
104+
dst = os.path.join(testBuildDirectory, dependsDir)
105+
if not os.path.isdir(dst):
106+
rtl.copyTree(src, dst, excludeExt)
115107

116108
### Run inflowwind on the test case
117109
if not noExec:

0 commit comments

Comments
 (0)