|
3 | 3 |
|
4 | 4 | plan = buildplan(localfunctions); |
5 | 5 |
|
6 | | -cnomex = ~HasTag("exe") & ~HasTag("mex") & ~HasTag("java") & ~HasTag("java_exe") & ~HasTag("python"); |
| 6 | +sel = ~HasTag("exe") & ~HasTag("java") & ~HasTag("java_exe") & ~HasTag("python"); |
7 | 7 | if ispc() |
8 | | - cnomex = cnomex & ~HasTag("unix"); |
| 8 | + sel = sel & ~HasTag("unix"); |
9 | 9 | else |
10 | | - cnomex = cnomex & ~HasTag("windows"); |
| 10 | + sel = sel & ~HasTag("windows"); |
11 | 11 | end |
12 | 12 |
|
13 | 13 | reportDir = fullfile(plan.RootFolder, ".buildtool"); |
14 | 14 | pkg_root = fullfile(plan.RootFolder, "+stdlib"); |
15 | 15 | test_root = fullfile(plan.RootFolder, "test"); |
16 | 16 |
|
17 | 17 | if ~isMATLABReleaseOlderThan("R2023b") |
18 | | - plan("clean") = matlab.buildtool.tasks.CleanTask; |
| 18 | + plan("clean") = matlab.buildtool.tasks.CleanTask(); |
19 | 19 | end |
20 | 20 |
|
21 | 21 | if isMATLABReleaseOlderThan("R2024b") |
22 | 22 |
|
23 | | - plan("test_main") = matlab.buildtool.Task(Actions=@(context) test_main(context, cnomex)); |
| 23 | + plan("test_main") = matlab.buildtool.Task(Actions=@(context) test_main(context, sel)); |
| 24 | + plan("test_java") = matlab.buildtool.tasks.TestTask(test_root, Tag="java"); |
| 25 | + |
| 26 | + plan("test") = matlab.buildtool.Task(Dependencies=["test_main", "test_java"]); |
24 | 27 |
|
25 | 28 | if isMATLABReleaseOlderThan('R2023b') |
26 | 29 | return |
27 | 30 | end |
28 | 31 |
|
29 | | - plan("test_java") = matlab.buildtool.tasks.TestTask(test_root, Tag="java"); |
| 32 | + plan("test_java_exe") = matlab.buildtool.tasks.TestTask(test_root, Tag="java_exe", Dependencies="exe"); |
30 | 33 | plan("test_exe") = matlab.buildtool.tasks.TestTask(test_root, Tag="exe", Dependencies="exe"); |
31 | 34 |
|
| 35 | + plan("test").Dependencies = [plan("test").Dependencies, "test_java_exe", "test_exe"]; |
| 36 | + |
32 | 37 | elseif isMATLABReleaseOlderThan("R2025a") |
33 | 38 | % Matlab == R2024b |
34 | | - plan("test:main") = matlab.buildtool.Task(Actions=@(context) test_main(context, cnomex)); |
| 39 | + plan("test:main") = matlab.buildtool.Task(Actions=@(context) test_main(context, sel)); |
35 | 40 |
|
36 | 41 | else |
37 | 42 | % Matlab >= R2025a |
38 | 43 | plan("test:main") = matlab.buildtool.tasks.TestTask(... |
39 | 44 | test_root, Description="Test non-MEX targets", ... |
40 | | - Selector=cnomex, ... |
| 45 | + Selector=sel, ... |
41 | 46 | SourceFiles=pkg_root, ... |
42 | 47 | RunOnlyImpactedTests=stdlib.checkout_license("MATLAB Test"), ... |
43 | 48 | TestResults=reportDir + "/TestResults_nomex.xml", Strict=true); |
|
0 commit comments