Skip to content

Commit 191d4be

Browse files
committed
test: Strict=false to allow deliberately failing tests to warn
1 parent 9bdee48 commit 191d4be

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

buildfile.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
plan("test") = matlab.buildtool.Task(Actions=@legacyTestTask);
1212
else
1313
plan("check") = matlab.buildtool.tasks.CodeIssuesTask(pkg_name, IncludeSubfolders=true);
14-
plan("test") = matlab.buildtool.tasks.TestTask("test", Strict=true);
14+
plan("test") = matlab.buildtool.tasks.TestTask("test", Strict=false);
1515
% can't use SourceFiles= if "mex" Task was run, even if
1616
% plan("test").DisableIncremental = true;
1717
% this means incremental tests can't be used with MEX files (as of R2024b)
1818
end
1919

2020
if ~isMATLABReleaseOlderThan("R2024a")
21-
plan("coverage") = matlab.buildtool.tasks.TestTask(Description="code coverage", Dependencies="clean", SourceFiles="test", Strict=true, CodeCoverageResults="code-coverage.xml");
21+
plan("coverage") = matlab.buildtool.tasks.TestTask(Description="code coverage", Dependencies="clean", SourceFiles="test", Strict=false, CodeCoverageResults="code-coverage.xml");
2222
end
2323

2424
plan("publish") = matlab.buildtool.Task(Description="HTML inline doc generate", Actions=@publishTask);
@@ -61,7 +61,7 @@ function legacyMexTask(bindir)
6161

6262

6363
function legacyTestTask(context)
64-
r = runtests(fullfile(context.Plan.RootFolder, "test"), Strict=true);
64+
r = runtests(fullfile(context.Plan.RootFolder, "test"), Strict=false);
6565
% Parallel Computing Toolbox takes more time to startup than is worth it for this task
6666

6767
assert(~isempty(r), "No tests were run")

0 commit comments

Comments
 (0)