|
13 | 13 | pkg_root = fullfile(plan.RootFolder, "+stdlib");
|
14 | 14 | test_root = fullfile(plan.RootFolder, "test");
|
15 | 15 |
|
| 16 | +if ~isMATLABReleaseOlderThan('R2025a') |
| 17 | + addons = matlab.addons.installedAddons; |
| 18 | + mt_ok = any(ismember(addons.Name, "MATLAB Test")) && license('checkout', 'MATLAB Test') == 1; |
| 19 | +end |
16 | 20 |
|
17 | 21 | if ~isMATLABReleaseOlderThan("R2023b")
|
18 | 22 | plan("clean") = matlab.buildtool.tasks.CleanTask;
|
|
38 | 42 | plan("test:main") = matlab.buildtool.tasks.TestTask(...
|
39 | 43 | test_root, Description="Test non-MEX targets",...
|
40 | 44 | Selector=cnomex, ...
|
41 |
| - SourceFiles=pkg_root, RunOnlyImpactedTests=true,... |
| 45 | + SourceFiles=pkg_root, RunOnlyImpactedTests=mt_ok,... |
42 | 46 | TestResults="release/TestResults_nomex.xml", Strict=true);
|
43 | 47 |
|
44 | 48 | end
|
|
63 | 67 | Tag = "java_exe", Dependencies="exe", ...
|
64 | 68 | TestResults="release/TestResults_java_exe.xml", Strict=true);
|
65 | 69 |
|
66 |
| - addons = matlab.addons.installedAddons; |
67 |
| - if any(ismember(addons.Name, "MATLAB Test")) |
| 70 | + |
| 71 | + if mt_ok |
68 | 72 | plan("coverage") = matlab.buildtool.tasks.TestTask(test_root, ...
|
69 | 73 | Description="code coverage", ...
|
70 | 74 | Dependencies="exe", ...
|
|
0 commit comments