Skip to content

Commit 6c1d35c

Browse files
committed
Filters out performance tests
1 parent da070cb commit 6c1d35c

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

runAllTests.m

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function runAllTests(id, repo)
55
% TODO Possible for repo commit sha conflict
66
% @body Technically two different repos can have the same commit hash, in
77
% which case the db.json file should be restructured
8-
% v1.0.1
8+
% v1.1.1
99
if nargin < 2; repo = 'rigbox'; end
1010
if nargin < 1; id = []; end
1111
try
@@ -22,14 +22,16 @@ function runAllTests(id, repo)
2222
import matlab.unittest.plugins.codecoverage.CoberturaFormat
2323

2424
%% Gather Rigbox main tests
25-
main_tests = testsuite;
25+
main_tests = testsuite('IncludeSubfolders', true);
2626

2727
%% Gather signals tests
2828
root = getOr(dat.paths,'rigbox');
29-
signals_tests = testsuite(fullfile(root, 'signals', 'tests'));
29+
signals_tests = testsuite(fullfile(root, 'signals', 'tests'), ...
30+
'IncludeSubfolders', true);
3031

3132
%% Gather alyx-matlab tests
32-
alyx_tests = testsuite(fullfile(root, 'alyx-matlab', 'tests'));
33+
alyx_tests = testsuite(fullfile(root, 'alyx-matlab', 'tests'), ...
34+
'IncludeSubfolders', true);
3335

3436
%% Filter & run
3537
% the suite is automatically sorted based on shared fixtures. However, if
@@ -45,6 +47,12 @@ function runAllTests(id, repo)
4547
all_tests = signals_tests;
4648
end
4749

50+
% Filter out performance tests
51+
% @todo Run performance tests
52+
% @body Currently the performance tests are entirely filtered out
53+
is_perf = @(t) contains(t.Name, 'perftest', 'IgnoreCase', true);
54+
[~, all_tests] = fun.filter(is_perf, all_tests);
55+
4856
runner = TestRunner.withTextOutput;
4957
reportFile = fullfile(fileparts(dbPath), 'CoverageResults.xml');
5058
reportFormat = CoberturaFormat(reportFile);

0 commit comments

Comments
 (0)