forked from OpenFAST/r-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
runRegressionTests.m
43 lines (34 loc) · 1.18 KB
/
runRegressionTests.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
pathToNewFiles = '..\..\build\reg_tests';
OpenFASTexe = '..\..\build\bin\openfast_Win32.exe';
goldStandard = 'windows-intel';
%% example files in the OpenFAST glue-code regression tests:
caseFile = './glue-codes/openfast/CaseList.md';
[pathstr] = fileparts(caseFile);
NewPath = fullfile(pathToNewFiles, pathstr);
fid = fopen(caseFile);
caseNames = textscan(fid,'%s');
caseNames = caseNames{1};
fclose(fid);
for i= 1:length(caseNames)
oldRoot = fullfile(pathstr, caseNames{i}, goldStandard, caseNames{i});
newRoot = fullfile(NewPath, caseNames{i}, caseNames{i});
status = system([OpenFASTexe ' ' newRoot '.fst']);
if status ~= 0
disp(['case failed: ' newRoot])
else
PlotFASToutput(strcat({oldRoot,newRoot},'.outb'),{oldRoot,newRoot});
end
end
% %% example files in the OpenFAST BeamDyn regression tests:
% caseFile = './modules/beamdyn/CaseList.md';
% [pathstr] = fileparts(caseFile);
%
% fid = fopen(caseFile);
% caseNames = textscan(fid,'%s');
% caseNames = caseNames{1};
% fclose(fid);
%
% for i= 1:length(caseNames)
% casePath = [ pathstr filesep caseNames{i} ];
% ConvertBeamDynDriver( [casePath filesep 'bd_driver.inp'], casePath );
% end