diff --git a/matlab/tests/test_requestnames.m b/matlab/tests/test_requestnames.m index 69e3831c361dd5c7a12158d07c28dcbf60465186..69bb158ec43590087dbe51de9ef80799d481f73c 100644 --- a/matlab/tests/test_requestnames.m +++ b/matlab/tests/test_requestnames.m @@ -1,30 +1,30 @@ classdef (SharedTestFixtures={... check_mds,setup_gdatpaths}) ... test_requestnames < matlab.unittest.TestCase - + properties (Abstract) Machine; end - + properties(TestParameter,Abstract) % parameters that will vary during tests shot; requests_fast; % placeholders requests_slow; end - + methods(Test,TestTags = {'fast'}) function test_gdat_call_fast(testCase,shot,requests_fast) test_gdat_call(testCase,shot,requests_fast); end end - + methods(Test,TestTags = {'slow'}) function test_gdat_call_slow(testCase,shot,requests_slow) test_gdat_call(testCase,shot,requests_slow); end end - + end function test_gdat_call(testCase,shot,request) @@ -34,6 +34,10 @@ testCase.assertTrue(ischar(request)); % gdat call 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 fprintf('Testing gdat call: %s\n',gdat_call); @@ -45,4 +49,4 @@ gdat_out = eval(gdat_call); %#ok<NASGU> % 'Warning issued from gdat call:\n %s\n',gdat_call); % (add optional sanity checks of gdat_out here) -end \ No newline at end of file +end