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

further run_gdat_tests fixes

parent 80f14a36
No related branches found
No related tags found
1 merge request!110Add test coverage and update test scripts
...@@ -2,8 +2,9 @@ function [passed,results] = run_tbx_tests(test_case) ...@@ -2,8 +2,9 @@ function [passed,results] = run_tbx_tests(test_case)
% Test runner for generic toolbox tests % Test runner for generic toolbox tests
if nargin==0 || isempty(test_case) if nargin==0 || isempty(test_case)
test_case = 'basic'; % default test_case = 'basic-tcv'; % default
end end
test_case = lower(test_case); % lowercase
if nargin < 2 if nargin < 2
coverage_report = false; % default coverage_report = false; % default
...@@ -16,7 +17,6 @@ needCOV=~isempty(getenv('GITLAB_CI')) && ~verLessThan('matlab','9.6.0') || cover ...@@ -16,7 +17,6 @@ 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;
...@@ -45,7 +45,10 @@ end ...@@ -45,7 +45,10 @@ end
testspath = fullfile(tbxpath,'tests'); testspath = fullfile(tbxpath,'tests');
lastwarn('',''); lastwarn('','');
suite_all = matlab.unittest.TestSuite.fromFolder(testspath);
suite_all = [matlab.unittest.TestSuite.fromClass(?fullfile(testspath,test_requestnames_tcv)),...
matlab.unittest.TestSuite.fromClass(?fullfile(testspath,test_tcv_get_ids))];
[~,s] = lastwarn(); [~,s] = lastwarn();
if isequal(s,'MATLAB:unittest:TestSuite:FileExcluded') if isequal(s,'MATLAB:unittest:TestSuite:FileExcluded')
fprintf('File excluded during test suite creation - possible syntax errors in a test class'); fprintf('File excluded during test suite creation - possible syntax errors in a test class');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment