Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit 13ac2ce

Browse files
committed
testsuite support for MATLAB version less than R2016a
1 parent fe8b723 commit 13ac2ce

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/resources/com/mathworks/ci/MatlabBuilder/runMatlabTests.m

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
function failed = runMatlabTests(produceJUnit, produceTAP, produceCobertura)
44

55
BASE_VERSION_MATLABUNIT_SUPPORT = '8.1';
6+
BASE_VERSION_TESTSUITE_SUPPORT = '9.0';
67

78
if verLessThan('matlab',BASE_VERSION_MATLABUNIT_SUPPORT)
89
error('MATLAB:unitTest:testFrameWorkNotSupported','Running tests automatically is not supported in this relase.');
@@ -12,10 +13,14 @@
1213
import('matlab.unittest.TestSuite');
1314

1415
%Create test suite for tests folder
15-
suite = testsuite(pwd,'IncludeSubfolders',true);
16+
if verLessThan('matlab',BASE_VERSION_TESTSUITE_SUPPORT)
17+
suite = matlab.unittest.TestSuite.fromFolder(pwd,'IncludingSubfolders',true);
18+
else
19+
suite = testsuite(pwd,'IncludeSubfolders',true);
20+
end
1621

1722
% Create and configure the runner
18-
runner = TestRunner.withTextOutput('Verbosity',3);
23+
runner = TestRunner.withTextOutput;
1924

2025
% Add the requested plugins
2126
resultsDir = fullfile(pwd, 'matlabTestArtifacts');

0 commit comments

Comments
 (0)