Skip to content
Snippets Groups Projects
Commit 27c53768 authored by Federico Felici's avatar Federico Felici
Browse files

Merge remote-tracking branch 'origin/master' into features/old2newnode02checks

parents 65ad0a0a 0317c9ad
No related branches found
No related tags found
No related merge requests found
......@@ -554,14 +554,13 @@ classdef SCDclass_expcode
tcv([],[],[],'compile');
tcv([],[],[],'term');
catch ME
tcv([],[],[],'term');
rethrow(ME)
end
end
function sim(obj)
sim('tcv')
end
end
end
methods (Access = private)
......
......@@ -6,7 +6,6 @@ classdef test_expcodes < matlab.unittest.TestCase
end
properties(MethodSetupParameter)
%expcode_number = {'1','1005','1006','1010'}; % list of expcodes to test
expcode_number = {'1','1005','1010'}; % list of expcodes to test
end
......@@ -36,7 +35,7 @@ classdef test_expcodes < matlab.unittest.TestCase
fprintf('\n=== Testing callinits for expcode %d: %s === \n',...
testCase.expcode_obj.maincode,testCase.expcode_obj.name);
testCase.expcode_obj.callinits;
fprintf('\n=== Testing setup for expcode %d: %s === \n',...
testCase.expcode_obj.maincode,testCase.expcode_obj.name);
......@@ -46,34 +45,25 @@ classdef test_expcodes < matlab.unittest.TestCase
end
methods(Test)
function test_expcode(testCase)
function test_expcode_compile(testCase)
fprintf('\n === Testing Simulink compilation for expcode %d: %s === \n',...
testCase.expcode_obj.maincode,testCase.expcode_obj.name);
% attempt compiling tcv.slx for this expcode
testCase.expcode_obj.compile; % compile tcv.slx with this expcode
end
function test_gencode(testCase)
switch testCase.expcode_obj.maincode
case 1010
SCDconf_setCODEconf('configurationSettingsCODEicc')
rtwbuild('SCD_rtccode_02_02');
rtwbuild('SCD_rtccode_02_03');
otherwise
% do nothing
end
function test_rtwbuild(testCase)
assert(~isempty(getenv('RTCCODE_LIBPATH')),'RTCCODE_LIBPATH environment variable needs to be defined to compile');
SCDconf_setCODEconf('configurationSettingsCODEicc')
switch testCase.expcode_obj.maincode
case 1005
rtwbuild('SCD_rtccode_02_02');
case 1010
rtwbuild('SCD_rtccode_02_02');
rtwbuild('SCD_rtccode_02_03');
otherwise
% do nothing
end
end
function test_compilation(testCase)
expcode_ignore_compile = [];
testCase.assumeTrue(~any(testCase.expcode_obj.maincode == expcode_ignore_compile))
node_to_compile = 'SCD_rtccode_02_02';
node_to_compile = 'SCD_rtccode_02_03';
load_system(node_to_compile);
SCDconf_setCODEconf;
rtwbuild(node_to_compile);
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment