From 868d92b0d284d3bc58fca0430d4b0151fba9bb34 Mon Sep 17 00:00:00 2001
From: Federico Felici <federico.felici@epfl.ch>
Date: Fri, 1 Oct 2021 11:35:32 +0200
Subject: [PATCH] Run all TCV tests in one job and split IMAS ones

---
 .gitlab-ci.yml                       | 56 ++++++++++++++--------------
 matlab/run_gdat_tests.m              |  6 ---
 matlab/tests/get_all_gdat_requests.m |  2 +-
 3 files changed, 30 insertions(+), 34 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5f7ddf1f..0935dc75 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,27 +11,45 @@ variables:
 # no build for gdat, so don't define jobs for build phase
 
 # test jobs
-#test-matlab-9.8.0:
-#  extends: .test-template
-#  tags:
-#  - lac8-gituser
-#  variables:
-#    MATLABCMD: matlab980
-#    TESTCASE: basic-tcv
+test-matlab-9.6.0-TCV:
+  extends: .test-template
+  tags:
+  - lac8-gituser
+  variables:
+    MATLABCMD: matlab960
+    TESTCASE: tcv
+  artifacts:
+   paths:
+    - test_${TBXTARGET}_${TESTCASE}_2019a_cov.xml
+   reports:
+    junit: test_${TBXTARGET}_${TESTCASE}_2019a.xml
+    cobertura: test_${TBXTARGET}_${TESTCASE}_2019a_cov.xml
 
-test-matlab-9.6.0:
+test-matlab-9.6.0-IMAS:
   extends: .test-template
   tags:
   - lac8-gituser
   variables:
     MATLABCMD: matlab960
-    TESTCASE: basic-tcv
+    TESTCASE: imas
+  artifacts:
+   paths:
+    - test_${TBXTARGET}_${TESTCASE}_2019a_cov.xml
+   reports:
+    junit: test_${TBXTARGET}_${TESTCASE}_2019a.xml
+    cobertura: test_${TBXTARGET}_${TESTCASE}_2019a_cov.xml
 
-test-matlab-9.2.0:
+test-matlab-9.2.0-TCV:
   extends: .test-template
   variables:
     MATLABCMD: matlab920
-    TESTCASE: basic-tcv
+    TESTCASE: tcv
+
+test-matlab-9.2.0-IMAS:
+  extends: .test-template
+  variables:
+    MATLABCMD: matlab920
+    TESTCASE: imas
 
 #test-matlab-9.8.0-all:
 #  extends: test-matlab-9.8.0
@@ -41,25 +59,9 @@ test-matlab-9.2.0:
 #  - schedules
 #  - web
 
-test-matlab-9.6.0-all:
-  extends: test-matlab-9.6.0
-  variables:
-     TESTCASE: all
-  only:
-  - schedules
-  - web
-  artifacts:
-   paths:
-    - test_${TBXTARGET}_${TESTCASE}_2019a_cov.xml
-   reports:
-    junit: test_${TBXTARGET}_${TESTCASE}_2019a.xml
-    cobertura: test_${TBXTARGET}_${TESTCASE}_2019a_cov.xml
-
 # Post test report collection
 code-coverage-960:
  extends: .code-coverage-960-template
- only:
- - scheduled
 
 # Staging, testing and deployment for releases
 pre-deployment-staging:
diff --git a/matlab/run_gdat_tests.m b/matlab/run_gdat_tests.m
index 0d60c7e0..94d428f5 100644
--- a/matlab/run_gdat_tests.m
+++ b/matlab/run_gdat_tests.m
@@ -63,12 +63,6 @@ end
 switch lower(test_case)
   case 'all'
     suite = suite_all; % run all
-  case 'basic'
-    s = ~HasTag('slow');
-    suite = suite_all.selectIf(s);
-  case 'basic-tcv'
-    s = ~HasTag('slow') & HasName(ContainsSubstring('tcv'));
-    suite = suite_all.selectIf(s);
   case 'tcv'
     s = HasName(ContainsSubstring('tcv'));
     suite = suite_all.selectIf(s);
diff --git a/matlab/tests/get_all_gdat_requests.m b/matlab/tests/get_all_gdat_requests.m
index a6791ba5..2783e339 100644
--- a/matlab/tests/get_all_gdat_requests.m
+++ b/matlab/tests/get_all_gdat_requests.m
@@ -5,7 +5,7 @@ function requests = get_all_gdat_requests(machine,testcase)
 switch machine
   % list of calls that take some time, to be skipped for fast tests
   case 'TCV'
-      slowlist = {'rtc','mhd','mpx','sxr','psi'};
+      slowlist = {'rtc','mpx','sxr','psi'};
   case 'AUG'
       slowlist = {'sxr','cxrs','transp','te_rho','ne_rho','nete_rho',...
         'ece_rho','eced_rho','cxrs_rho','eqdsk','equil'}; 
-- 
GitLab