Skip to content
Snippets Groups Projects
Commit 83b60d70 authored by Federico Felici's avatar Federico Felici Committed by Olivier Sauter
Browse files

re-add custom test selectors

parent 1fc86de4
No related branches found
No related tags found
1 merge request!110Add test coverage and update test scripts
...@@ -16,7 +16,8 @@ needCOV=~isempty(getenv('GITLAB_CI')) && ~verLessThan('matlab','9.6.0') || cover ...@@ -16,7 +16,8 @@ needCOV=~isempty(getenv('GITLAB_CI')) && ~verLessThan('matlab','9.6.0') || cover
%% Default outputs %% Default outputs
passed=false; results=[]; % default outputs passed=false; results=[]; % default outputs
test_case = lower(test_case); % lowercase
%% Import some classes we need %% Import some classes we need
import matlab.unittest.selectors.HasTag; import matlab.unittest.selectors.HasTag;
import matlab.unittest.constraints.ContainsSubstring; import matlab.unittest.constraints.ContainsSubstring;
...@@ -56,17 +57,16 @@ switch lower(test_case) ...@@ -56,17 +57,16 @@ switch lower(test_case)
suite = suite_all; % run all suite = suite_all; % run all
case 'basic' case 'basic'
s = ~HasTag('slow'); s = ~HasTag('slow');
suite = suite_all.selectIf(s); case 'basic-tcv'
s = ~HasTag('slow') & HasName(ContainsSubstring('tcv'));
case 'tcv' case 'tcv'
s = HasName(ContainsSubstring('tcv')); s = HasName(ContainsSubstring('tcv'));
suite = suite_all.selectIf(s);
case 'aug' case 'aug'
s = HasName(ContainsSubstring('aug')); s = HasName(ContainsSubstring('aug'));
suite = suite_all.selectIf(s);
otherwise otherwise
s = HasTag(test_case); s = HasTag(test_case);
suite = suite_all.selectIf(s);
end end
suite = suite_all.selectIf(s);
if isempty(suite) if isempty(suite)
fprintf('\nEmpty test suite returned for TestTag=''%s''\n',test_case); return; fprintf('\nEmpty test suite returned for TestTag=''%s''\n',test_case); return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment