forked from gemini3d/mat_gemini
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestGemini.m
More file actions
23 lines (17 loc) · 719 Bytes
/
Copy pathTestGemini.m
File metadata and controls
23 lines (17 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import matlab.unittest.TestRunner
import matlab.unittest.Verbosity
import matlab.unittest.plugins.CodeCoveragePlugin
import matlab.unittest.plugins.XMLPlugin
import matlab.unittest.plugins.codecoverage.CoberturaFormat
name = "gemini3d.tests";
suite = testsuite(name);
runner = TestRunner.withTextOutput('OutputDetail', Verbosity.Concise);
if getenv("CI") == "true"
mkdir('code-coverage');
mkdir('test-results');
runner.addPlugin(XMLPlugin.producingJUnitFormat('test-results/results.xml'));
runner.addPlugin(CodeCoveragePlugin.forPackage(name, 'Producing', CoberturaFormat('code-coverage/coverage.xml')));
end
results = runner.run(suite);
assert(~isempty(results), "no tests found")
assertSuccess(results)