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

Fix small test issues and add .gitlab-ci.yml

Basic tests pass on LAC
parent 9239ee99
No related branches found
No related tags found
1 merge request!4Feature/testsuite
# Includes a common template
include:
- project: 'spc/tcv/tbx/git-tools-spc'
file: 'gitlab-ci-tbx-template.yml'
# no build for gdat, so don't define jobs for this phase
.deploy: # do later
extends: .deploy-to-lac-template
test-matlab850-basic:
extends: .test-template
before_script:
- cd matlab
variables:
MATLABCMD: matlab850
TESTARGUMENT: basic
test-matlab920:
extends: .test-template
before_script:
- cd matlab
variables:
MATLABCMD: matlab920
.test-matlab850-deployed:
extends: .test-template-deployed
variables:
MATLABCMD: matlab850
.test-matlab920-deployed:
extends: .test-template-deployed
variables:
MATLABCMD: matlab920
......@@ -22,7 +22,7 @@ switch test_case
import matlab.unittest.selectors.HasName;
import matlab.unittest.constraints.ContainsSubstring;
suite = suite_all.selectIf(HasName(ContainsSubstring('TCV')) & ...
suite = suite_all.selectIf(HasParameter('Value','TCV') & ...
(HasParameter('Value','ip') | HasParameter('Value','q_rho')));
case 'TCV'
suite = suite_all.selectIf(HasParameter('machine',IsEqualTo('TCV')));
......
......@@ -4,17 +4,18 @@ classdef (SharedTestFixtures={...
properties(TestParameter,Abstract)
% parameters that will vary during tests
machine;
shot;
request; % placeholders
end
methods(Test)
function test_gdat_call(testCase,shot,request)
testCase.assertTrue(isnumeric(num2str(shot)));
function test_gdat_call(testCase,machine,shot,request)
testCase.assertTrue(isnumeric(str2double(shot)));
testCase.assertTrue(ischar(request));
% gdat call
gdat_call = sprintf(['gdat_' lower(testCase.machine) '(%s,''%s'')'],shot,request);
gdat_call = sprintf(['gdat_' lower(machine) '(%s,''%s'')'],shot,request);
% logging
testCase.log(sprintf('gdat_call: %s\n',gdat_call));
......
......@@ -3,6 +3,7 @@ classdef test_requestnames_AUG < test_requestnames
properties(TestParameter)
% parameters that will vary during tests
machine = {'AUG'};
shot = {'30594'};
request = get_all_gdat_requests('AUG');
end
......
......@@ -3,6 +3,7 @@ classdef test_requestnames_TCV < test_requestnames
properties(TestParameter)
% parameters that will vary during tests
machine = {'TCV'};
shot = {'48836'};
request = get_all_gdat_requests('TCV');
end
......
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