|
37 | 37 | import pass_fail |
38 | 38 | from errorPlotting import exportCaseSummary |
39 | 39 |
|
| 40 | +##### Helper functions |
| 41 | +excludeExt=['.out','.outb','.ech','.yaml','.sum','.log'] |
| 42 | + |
40 | 43 | ##### Main program |
41 | 44 |
|
42 | 45 | ### Store the python executable for future python calls |
|
80 | 83 | inputsDirectory = os.path.join(moduleDirectory, caseName) |
81 | 84 | targetOutputDirectory = os.path.join(inputsDirectory) |
82 | 85 | testBuildDirectory = os.path.join(buildDirectory, caseName) |
| 86 | + |
| 87 | +dependsDir = os.path.join("..", "..", "openfast", "MHK_RM1_Floating_Tank-scaled") |
83 | 88 |
|
84 | 89 | # verify all the required directories exist |
85 | 90 | if not os.path.isdir(rtest): |
|
92 | 97 | # create the local output directory if it does not already exist |
93 | 98 | # and initialize it with input files for all test cases |
94 | 99 | 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) |
115 | 107 |
|
116 | 108 | ### Run inflowwind on the test case |
117 | 109 | if not noExec: |
|
0 commit comments