Combine test data from harness models
collects
the test data and initialization commands from each test harness model
and saves them in a handle to the new model.status
= slvnvmergeharness(name
, models
, initialization_commands
)
is
a cell array of character vectors or strings that are the same length as initialization_commands
models
.
It defines parameter settings for the test cases of each test harness
model.
slvnvmergeharness
assumes that name
and
the rest of the models in models
have only one Signal
Builder block on the top level. If a model in models
does
not meet this restriction or its top-level Signal Builder block
does not have the same number of signals as the top-level Signal
Builder block in name
, slvnvmergeharness
does
not merge that model's test data into name
.
% Log the input signals to the three Model blocks in the sldemo_mdlref_basic example model % that each reference the same model: open_system('sldemo_mdlref_basic'); data1 = slvnvlogsignals('sldemo_mdlref_basic/CounterA'); data2 = slvnvlogsignals('sldemo_mdlref_basic/CounterB'); data3 = slvnvlogsignals('sldemo_mdlref_basic/CounterC'); open_system('sldemo_mdlref_counter'); % Make three test harnesses using the logged signals: harness1FilePath = slvnvmakeharness('sldemo_mdlref_counter', data1); harness2FilePath = slvnvmakeharness('sldemo_mdlref_counter', data2); harness3FilePath = slvnvmakeharness('sldemo_mdlref_counter', data3) [~, harness1] = fileparts(harness1FilePath); [~, harness2] = fileparts(harness2FilePath); [~, harness3] = fileparts(harness3FilePath); % Merge the three test harnesses: slvnvmergeharness('new_harness_model',{harness1, harness2, harness3});