This repository was archived by the owner on Mar 27, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
src/main/resources/com/mathworks/ci/MatlabBuilder Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 88 error(' MATLAB:unitTest:testFrameWorkNotSupported' ,' Running tests automatically is not supported in this relase.' );
99end
1010
11- import(' matlab.unittest.TestRunner' );
12- import(' matlab.unittest.TestSuite' );
13-
1411% Create test suite for tests folder
15- suite = testsuite( pwd , ' IncludeSubfolders ' , true );
12+ suite = getTestSuite( );
1613
1714% Create and configure the runner
18- runner = TestRunner .withTextOutput(' Verbosity' ,3 );
15+ import(' matlab.unittest.TestRunner' );
16+ runner = TestRunner .withTextOutput ;
1917
2018% Add the requested plugins
2119resultsDir = fullfile(pwd , ' matlabTestArtifacts' );
8078fclose(fopen(tapFile ,' w' ));
8179tapToFile = matlab .unittest .plugins .ToFile(tapFile );
8280
81+ function suite = getTestSuite()
82+ import(' matlab.unittest.TestSuite' );
83+ BASE_VERSION_TESTSUITE_SUPPORT = ' 9.0' ;
84+ if verLessThan(' matlab' ,BASE_VERSION_TESTSUITE_SUPPORT )
85+ suite = matlab .unittest .TestSuite .fromFolder(pwd ,' IncludingSubfolders' ,true );
86+ else
87+ suite = testsuite(pwd ,' IncludeSubfolders' ,true );
88+ end
89+
8390
8491function mkdirIfNeeded(dir )
8592if exist(dir ,' dir' ) ~= 7
You can’t perform that action at this time.
0 commit comments