Skip to content

Commit 8d0ae57

Browse files
committed
buildfile reports dir
1 parent 5ce1518 commit 8d0ae57

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

buildfile.m

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
sel = sel & ~HasTag("windows");
1111
end
1212

13-
reportDir = fullfile(plan.RootFolder, ".buildtool");
13+
reportDir = fullfile(plan.RootFolder, 'reports');
14+
if ~isfolder(reportDir)
15+
mkdir(reportDir);
16+
end
1417
pkg_root = fullfile(plan.RootFolder, "+stdlib");
1518
test_root = fullfile(plan.RootFolder, "test");
1619

@@ -45,7 +48,7 @@
4548
Selector=sel, ...
4649
SourceFiles=pkg_root, ...
4750
RunOnlyImpactedTests=stdlib.checkout_license("MATLAB Test"), ...
48-
TestResults=reportDir + "/TestResults_main.xml", Strict=true);
51+
TestResults=fullfile(reportDir, 'TestResults_main.xml'), Strict=true);
4952

5053
plan("test").Description = "Run all self-tests";
5154

@@ -67,13 +70,16 @@
6770
plan("test:java_exe") = matlab.buildtool.tasks.TestTask(...
6871
test_root, Description="test Java exe targets", ...
6972
Tag = "java_exe", Dependencies="exe", Strict=true);
73+
end
7074

75+
if ~isMATLABReleaseOlderThan('R2024a')
7176

72-
plan("coverage") = matlab.buildtool.tasks.TestTask(test_root, ...
77+
plan('coverage') = matlab.buildtool.tasks.TestTask(test_root, ...
7378
Description="Run code coverage", ...
74-
Dependencies="exe", ...
79+
Dependencies='exe', ...
7580
SourceFiles=pkg_root, ...
7681
Strict=false);
82+
plan('coverage').DisableIncremental = true;
7783

7884
coverageReport = fullfile(reportDir, 'coverage-report.html');
7985
if stdlib.checkout_license("MATLAB Test")

0 commit comments

Comments
 (0)