From b11147d7422178524d7d1ff7ad1e16ce3ab9114b Mon Sep 17 00:00:00 2001 From: David Davies Date: Thu, 4 Jan 2024 09:39:51 +0000 Subject: [PATCH] Fix hardcoded atlas grids settings for ctests (#66) * Unset atlas grid environment variables and move variables to ci CmakeLists --- CMakeLists.txt | 3 +++ ci/CMakeLists.txt | 5 +++++ src/tests/orca-jedi/CMakeLists.txt | 5 ----- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e68347b..f675566 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,9 @@ ecbuild_debug( " eckit_FEATURES : [${eckit_FEATURES}]" ) find_package( atlas 0.29 REQUIRED ) ecbuild_debug( " atlas_FEATURES: [${atlas_FEATURES}]" ) +find_package( atlas-orca REQUIRED ) +ecbuild_debug( " atlas_orca_FEATURES: [${atlas_orca_FEATURES}]" ) + find_package( oops REQUIRED ) ecbuild_debug( " oops_FEATURES : [${oops_FEATURES}]" ) diff --git a/ci/CMakeLists.txt b/ci/CMakeLists.txt index e404f71..2756531 100644 --- a/ci/CMakeLists.txt +++ b/ci/CMakeLists.txt @@ -7,6 +7,11 @@ project( orca-jedi-ci VERSION 1.0 LANGUAGES C CXX Fortran ) set( ENABLE_MPI ON CACHE BOOL "Compile with MPI" ) set( ENABLE_OMP ON CACHE BOOL "Compile with OpenMP" ) +LIST( APPEND ATLAS_TEST_ENVIRONMENT + ATLAS_ORCA_CACHING=1 + ATLAS_CACHE_PATH=${CMAKE_BINARY_DIR}/share + PLUGINS_MANIFEST_PATH=${CMAKE_BINARY_DIR}/share/plugins ) + add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/jedicmake" EXCLUDE_FROM_ALL) if(NOT DEFINED jedicmake_DIR) set(jedicmake_DIR "${CMAKE_BINARY_DIR}/jedicmake") diff --git a/src/tests/orca-jedi/CMakeLists.txt b/src/tests/orca-jedi/CMakeLists.txt index 9c82961..3710833 100644 --- a/src/tests/orca-jedi/CMakeLists.txt +++ b/src/tests/orca-jedi/CMakeLists.txt @@ -6,11 +6,6 @@ ecbuild_add_test( TARGET test_orcajedi_nemo_io_field_reader.x SOURCES test_nemo_io_field_reader.cc LIBS orcamodel ) -LIST( APPEND ATLAS_TEST_ENVIRONMENT - ATLAS_ORCA_CACHING=1 - ATLAS_CACHE_PATH=${CMAKE_BINARY_DIR}/share - PLUGINS_MANIFEST_PATH=${CMAKE_BINARY_DIR}/share/plugins ) - ecbuild_add_test( TARGET test_orcajedi_nemo_io_field_writer.x SOURCES test_nemo_io_field_writer.cc ENVIRONMENT ${ATLAS_TEST_ENVIRONMENT}