From f9b8bf26d2f06c2dc3740c310ad1dbc3b9019574 Mon Sep 17 00:00:00 2001 From: Jonah Miller Date: Thu, 30 Nov 2023 11:38:22 -0700 Subject: [PATCH 1/4] update spack2 v2 to spack2 v3 --- spack-repo/packages/spiner/package.py | 3 ++- test/CMakeLists.txt | 3 ++- test/test.cpp | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/spack-repo/packages/spiner/package.py b/spack-repo/packages/spiner/package.py index e34fd43fb..96e396f22 100644 --- a/spack-repo/packages/spiner/package.py +++ b/spack-repo/packages/spiner/package.py @@ -53,7 +53,8 @@ class Spiner(CMakePackage, CudaPackage): depends_on("cmake@3.12:", when="@:1.5.1") depends_on("cmake@3.19:", when="@1.6.0:") - depends_on("catch2@2.13.4:2.13.9") + depends_on("catch2@v3.0.1:") + depends_on("catch2@2.13.4:2.13.9", when="@:1.6.2") depends_on("ports-of-call@1.2.0:", when="@:1.5.1") depends_on("ports-of-call@1.5.1:", when="@1.6.0:") depends_on("ports-of-call@main", when="@main") diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index bb84c5c5e..efb63dd6e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -12,7 +12,8 @@ spiner_content_declare(Catch2 GIT_REPO https://github.com/catchorg/Catch2.git - GIT_TAG v2.13.7 + GIT_TAG v3.0.1 # or any later release + EXPECTED_TARGETS Catch2::Catch2 NAMESPACE spinerTest ) diff --git a/test/test.cpp b/test/test.cpp index f6b8edb62..d6c28a990 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -29,8 +29,8 @@ #include "hdf5_hl.h" #endif -#define CATCH_CONFIG_RUNNER -#include "catch2/catch.hpp" +#include +#include using DataBox = Spiner::DataBox; using Spiner::IndexType; From 7e2c42d55e76d1d421e1a3e98b13d69e6afaaa65 Mon Sep 17 00:00:00 2001 From: Jonah Miller Date: Thu, 30 Nov 2023 11:43:18 -0700 Subject: [PATCH 2/4] oops missing @main --- spack-repo/packages/spiner/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spack-repo/packages/spiner/package.py b/spack-repo/packages/spiner/package.py index 96e396f22..811b73b66 100644 --- a/spack-repo/packages/spiner/package.py +++ b/spack-repo/packages/spiner/package.py @@ -53,7 +53,7 @@ class Spiner(CMakePackage, CudaPackage): depends_on("cmake@3.12:", when="@:1.5.1") depends_on("cmake@3.19:", when="@1.6.0:") - depends_on("catch2@v3.0.1:") + depends_on("catch2@v3.0.1:", when="@main") depends_on("catch2@2.13.4:2.13.9", when="@:1.6.2") depends_on("ports-of-call@1.2.0:", when="@:1.5.1") depends_on("ports-of-call@1.5.1:", when="@1.6.0:") From ee74d01be199a1170151771caebeb8976bf8f8fc Mon Sep 17 00:00:00 2001 From: Jonah Miller Date: Thu, 30 Nov 2023 12:02:45 -0700 Subject: [PATCH 3/4] add test variant --- .gitlab-ci.yml | 2 +- spack-repo/packages/spiner/package.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 734f6a896..943441b35 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,7 @@ variables: GIT_SUBMODULE_STRATEGY: recursive SPINER_GCC_VERSION: "9.3.0" SPINER_CUDA_VERSION: "11.6.0" - SPINER_SPACK_SPEC: "spiner@main+python%gcc@${SPINER_GCC_VERSION}" + SPINER_SPACK_SPEC: "spiner@main+python+test%gcc@${SPINER_GCC_VERSION}" COLOR_CYAN: "\e[1;36m" COLOR_PLAIN: "\e[0m" # set to different spack upstream for testing diff --git a/spack-repo/packages/spiner/package.py b/spack-repo/packages/spiner/package.py index 811b73b66..1e09bce58 100644 --- a/spack-repo/packages/spiner/package.py +++ b/spack-repo/packages/spiner/package.py @@ -51,10 +51,12 @@ class Spiner(CMakePackage, CudaPackage): variant("python", default=False, description="Python, Numpy & Matplotlib Support") + variant("test", default=False, description="Build tests") + depends_on("cmake@3.12:", when="@:1.5.1") depends_on("cmake@3.19:", when="@1.6.0:") - depends_on("catch2@v3.0.1:", when="@main") - depends_on("catch2@2.13.4:2.13.9", when="@:1.6.2") + depends_on("catch2@v3.0.1:", when="@main +test") + depends_on("catch2@2.13.4:2.13.9", when="@:1.6.2 +test") depends_on("ports-of-call@1.2.0:", when="@:1.5.1") depends_on("ports-of-call@1.5.1:", when="@1.6.0:") depends_on("ports-of-call@main", when="@main") From 1b2976e7d96261fdca501ca80843eaf6f61903a6 Mon Sep 17 00:00:00 2001 From: Jonah Miller Date: Thu, 30 Nov 2023 12:16:56 -0700 Subject: [PATCH 4/4] oops typo --- spack-repo/packages/spiner/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spack-repo/packages/spiner/package.py b/spack-repo/packages/spiner/package.py index 1e09bce58..b6f730fb5 100644 --- a/spack-repo/packages/spiner/package.py +++ b/spack-repo/packages/spiner/package.py @@ -55,7 +55,7 @@ class Spiner(CMakePackage, CudaPackage): depends_on("cmake@3.12:", when="@:1.5.1") depends_on("cmake@3.19:", when="@1.6.0:") - depends_on("catch2@v3.0.1:", when="@main +test") + depends_on("catch2@3.0.1:", when="@main +test") depends_on("catch2@2.13.4:2.13.9", when="@:1.6.2 +test") depends_on("ports-of-call@1.2.0:", when="@:1.5.1") depends_on("ports-of-call@1.5.1:", when="@1.6.0:")