From 0f865de177eb887a6bde8b79818ef44342a842e1 Mon Sep 17 00:00:00 2001
From: Basile Desloges <basile.desloges@cea.fr>
Date: Wed, 12 Mar 2025 18:18:51 +0100
Subject: [PATCH] [ci] Update Eva and Mthread nix files
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The `mthread-tests` CI target is removed and mthread tests are now run
at the same time as Eva's other tests.

Co-authored-by: David Bühler <david.buhler@cea.fr>
---
 .gitlab-ci.yml        |  6 ------
 nix/eva-tests.nix     | 11 +++++------
 nix/mthread-tests.nix |  9 ---------
 nix/pkgs.nix          |  1 -
 4 files changed, 5 insertions(+), 22 deletions(-)
 delete mode 100644 nix/mthread-tests.nix

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7c07353e14..32bb5bbef0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -219,12 +219,6 @@ eva-domains:
   <<: *eva_template
   <<: *eva_domains
 
-mthread-tests:
-  stage: tests
-  script:
-    - ./nix/build-proxy.sh mthread-tests
-  <<: *coverage
-
 kernel-tests:
   stage: tests
   script:
diff --git a/nix/eva-tests.nix b/nix/eva-tests.nix
index 6669e601ad..dcf9754fea 100644
--- a/nix/eva-tests.nix
+++ b/nix/eva-tests.nix
@@ -2,14 +2,13 @@
 
 let eva-tests = "eva-tests" + (if config == "" then "" else "-" + config); in
 let ptests = "ptests_config" + (if config == "" then "" else "_" + config) ; in
-let tbuiltins = " @tests/builtins/" + ptests ; in
-let tfloat = " @tests/float/" + ptests ; in
-let tidct = " @tests/idct/" + ptests ; in
-let tvalue = " @tests/value/" + ptests ; in
+let eva-test-dir = "src/plugins/eva/tests" ; in
+let eva-test-target = "@${eva-test-dir}/${ptests}" ; in
 
 mk_tests {
   tests-name = eva-tests ;
   tests-command = ''
-    dune exec -- frama-c-ptests -never-disabled tests
-    dune build -j1 '' + tbuiltins + tfloat + tidct + tvalue + "\n" ;
+    dune exec -- frama-c-ptests -never-disabled ${eva-test-dir}
+    dune build -j1 ${eva-test-target}
+  '';
 }
diff --git a/nix/mthread-tests.nix b/nix/mthread-tests.nix
deleted file mode 100644
index 5bcd6e3c72..0000000000
--- a/nix/mthread-tests.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ mk_tests } :
-
-mk_tests {
-  tests-name = "mthread-tests";
-  tests-command = ''
-    dune exec -- frama-c-ptests -never-disabled src/plugins/eva/tests
-    dune build -j1 @src/plugins/eva/tests/mthread/ptests
-    '';
-}
diff --git a/nix/pkgs.nix b/nix/pkgs.nix
index 445da0bdec..ccd47cb997 100644
--- a/nix/pkgs.nix
+++ b/nix/pkgs.nix
@@ -44,7 +44,6 @@ let
     eva-multidim-tests = oself.callPackage ./eva-tests.nix { config = "multidim" ; };
     eva-octagon-tests = oself.callPackage ./eva-tests.nix { config = "octagon" ; };
     eva-symblocs-tests = oself.callPackage ./eva-tests.nix { config = "symblocs" ; };
-    mthread-tests = oself.callPackage ./mthread-tests.nix {};
     full-tests = oself.callPackage ./full-tests.nix {};
     kernel-tests = oself.callPackage ./kernel-tests.nix {};
     plugins-tests = oself.callPackage ./plugins-tests.nix {};
-- 
GitLab