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