Skip to content
Snippets Groups Projects
Commit b6d51716 authored by Olivier Sauter's avatar Olivier Sauter
Browse files

add short test for gdat tcv calls returning 1 if ok

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@11767 d63d8f72-b253-0410-a779-e742ad2e26cf
parent 0bfce553
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ function [pass,request_list,err,telaps,skipped,gdat_results] = test_all_requestn ...@@ -7,7 +7,7 @@ function [pass,request_list,err,telaps,skipped,gdat_results] = test_all_requestn
% pass = test_all_requestnames('param1',value1,'param2',value2,...); % % pass = test_all_requestnames('param1',value1,'param2',value2,...); %
% INPUT PARAMETERS (optional) % INPUT PARAMETERS (optional)
% machine: string of machine name (e.g. 'aug'). (default: gdat internal default) % machine: string of machine name (e.g. 'aug'). (default: gdat internal default)
% testmode: depth of test: 'reduced' or 'full' (default: 'reduced') % testmode: depth of test: 'reduced' or 'full' (default: 'reduced') or cell array of requests to test
% nverbose: 0 for silent, 1 for text, 2 for plots (default: 1) % nverbose: 0 for silent, 1 for text, 2 for plots (default: 1)
% OUTPUTS % OUTPUTS
% pass: single boolean indicating pass/fail of test % pass: single boolean indicating pass/fail of test
...@@ -46,13 +46,17 @@ switch upper(machine) ...@@ -46,13 +46,17 @@ switch upper(machine)
end end
%% possibly skip some since they take too long for a reduced test %% possibly skip some since they take too long for a reduced test
switch testmode if iscell(testmode)
case 'reduced' skip = setdiff(request_list,testmode);
skip = skip_list(machine); else
case 'full' switch testmode
skip = ''; % skip none case 'reduced'
otherwise skip = skip_list(machine);
error('invalid testmode, should be ''reduced'' or ''full'''); case 'full'
skip = ''; % skip none
otherwise
error('invalid testmode, should be ''reduced'' or ''full''');
end
end end
%% init %% init
...@@ -84,7 +88,7 @@ for ireq = 1:Nreq ...@@ -84,7 +88,7 @@ for ireq = 1:Nreq
err(ireq) = 0; err(ireq) = 0;
telaps(ireq) = 0; telaps(ireq) = 0;
skipped(ireq) = true; skipped(ireq) = true;
fprintf('\n skipping gdat request ''%s''\n',myrequest) if nverbose>=1; fprintf('\n skipping gdat request ''%s''\n',myrequest); end
end end
end end
......
function [pass] = test_gdat_tcv_short
%
% [pass] = test_gdat_tcv_short
%
% tests a few signals
%
% pass: single boolean indicating pass/fail of test
%
test_machine = 'tcv';
test_signals = {'ip', 'q_rho'};
[pass,request_list,err,telaps,skipped,gdat_results] = test_all_requestnames('machine',test_machine,'testmode',test_signals,'nverbose',0);
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