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

Merge branch 'run_test_eqdsk_no_write' into 'master'

add write,0 in gdat call for eqdsk to avoid writing in deployment

See merge request spc/tcv/tbx/gdat!43
parents 235674f2 88e5217e
Branches
Tags release-v4.3.10
1 merge request!43add write,0 in gdat call for eqdsk to avoid writing in deployment
Pipeline #31423 passed
classdef (SharedTestFixtures={... classdef (SharedTestFixtures={...
check_mds,setup_gdatpaths}) ... check_mds,setup_gdatpaths}) ...
test_requestnames < matlab.unittest.TestCase test_requestnames < matlab.unittest.TestCase
properties (Abstract) properties (Abstract)
Machine; Machine;
end end
properties(TestParameter,Abstract) properties(TestParameter,Abstract)
% parameters that will vary during tests % parameters that will vary during tests
shot; shot;
requests_fast; % placeholders requests_fast; % placeholders
requests_slow; requests_slow;
end end
methods(Test,TestTags = {'fast'}) methods(Test,TestTags = {'fast'})
function test_gdat_call_fast(testCase,shot,requests_fast) function test_gdat_call_fast(testCase,shot,requests_fast)
test_gdat_call(testCase,shot,requests_fast); test_gdat_call(testCase,shot,requests_fast);
end end
end end
methods(Test,TestTags = {'slow'}) methods(Test,TestTags = {'slow'})
function test_gdat_call_slow(testCase,shot,requests_slow) function test_gdat_call_slow(testCase,shot,requests_slow)
test_gdat_call(testCase,shot,requests_slow); test_gdat_call(testCase,shot,requests_slow);
end end
end end
end end
function test_gdat_call(testCase,shot,request) function test_gdat_call(testCase,shot,request)
...@@ -34,6 +34,10 @@ testCase.assertTrue(ischar(request)); ...@@ -34,6 +34,10 @@ testCase.assertTrue(ischar(request));
% gdat call % gdat call
gdat_call = sprintf(['gdat_' lower(testCase.Machine) '(%s,''%s'')'],shot,request); gdat_call = sprintf(['gdat_' lower(testCase.Machine) '(%s,''%s'')'],shot,request);
if strcmp(request,'eqdsk')
% avoid writing files in /tmp, may not be allowed
gdat_call = sprintf(['gdat_' lower(testCase.Machine) '(%s,''%s'',''write'',0)'],shot,request);
end
% logging % logging
fprintf('Testing gdat call: %s\n',gdat_call); fprintf('Testing gdat call: %s\n',gdat_call);
...@@ -45,4 +49,4 @@ gdat_out = eval(gdat_call); %#ok<NASGU> ...@@ -45,4 +49,4 @@ gdat_out = eval(gdat_call); %#ok<NASGU>
% 'Warning issued from gdat call:\n %s\n',gdat_call); % 'Warning issued from gdat call:\n %s\n',gdat_call);
% (add optional sanity checks of gdat_out here) % (add optional sanity checks of gdat_out here)
end end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment