Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ endif()

include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )

if (HAVE_FDB_REMOTE)
ecbuild_configure_file( fdb_remote_cleanup.sh.in fdb_remote_cleanup.sh @ONLY )

ecbuild_add_test(
TARGET fdb_test_remote_cleanup
TYPE SCRIPT
COMMAND fdb_remote_cleanup.sh
TEST_PROPERTIES
RESOURCE_LOCK fdb_remote_tests # Prevent concurrent runs of remote tests
LABELS remotefdb
)
endif()

add_subdirectory( fdb )
add_subdirectory( chunked_data_view )
add_subdirectory( regressions )
Expand Down
25 changes: 13 additions & 12 deletions tests/fdb/remote/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@ if (HAVE_FDB_BUILD_TOOLS AND HAVE_GRIB)
ecbuild_configure_file( store.yaml.in store.yaml @ONLY )
ecbuild_configure_file( client.yaml.in client.yaml @ONLY )

ecbuild_add_test(
TARGET fdb_test_remote_api
TYPE SCRIPT
COMMAND ${FDB_TEST_SERVER_SCRIPT}
ARGS ${CMAKE_CURRENT_BINARY_DIR} client.yaml catalogue.yaml store.yaml
TEST_DEPENDS fdb_test_remote_api_bin
ENVIRONMENT "${test_environment}"
TEST_PROPERTIES
TIMEOUT 300
RESOURCE_LOCK fdb_remote_tests # Prevent concurrent runs of remote tests
LABELS remotefdb
)
# ecbuild_add_test(
# TARGET fdb_test_remote_api
# TYPE SCRIPT
# COMMAND ${FDB_TEST_SERVER_SCRIPT}
# ARGS ${CMAKE_CURRENT_BINARY_DIR} client.yaml catalogue.yaml store.yaml
# TEST_DEPENDS "fdb_test_remote_cleanup;fdb_test_remote_api_bin"
# ENVIRONMENT "${test_environment}"
# TEST_PROPERTIES
# TIMEOUT 300
# RESOURCE_LOCK fdb_remote_tests # Prevent concurrent runs of remote tests
# RUN_SERIAL TRUE
# LABELS remotefdb
# )
endif()

3 changes: 3 additions & 0 deletions tests/fdb_remote_cleanup.sh.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

killall fdb-server || true
1 change: 1 addition & 0 deletions tests/regressions/FDB-419/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ecbuild_add_test(
SOURCES fdb_419_regression_test.cc
LIBS fdb5 eckit metkit
ENVIRONMENT FDB_SERVER_EXECUTABLE=$<TARGET_FILE:fdb-server>
TEST_DEPENDS fdb_test_remote_cleanup
ENVIRONMENT "${test_environment}"
TEST_PROPERTIES
RESOURCE_LOCK fdb_remote_tests # Prevent concurrent runs of remote tests
Expand Down
2 changes: 1 addition & 1 deletion tests/regressions/FDB-491/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ecbuild_add_test(
TYPE SCRIPT
COMMAND ${FDB_TEST_SERVER_SCRIPT}
ARGS ${CMAKE_CURRENT_BINARY_DIR} client.yaml catalogue.yaml store.yaml
TEST_DEPENDS fdb_test_remote_api_bin
TEST_DEPENDS "fdb_test_remote_cleanup;fdb_test_remote_api_bin"
ENVIRONMENT "${test_environment}"
TEST_PROPERTIES
TIMEOUT 300
Expand Down
1 change: 1 addition & 0 deletions tests/regressions/FDB-595/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ecbuild_add_test(
TARGET FDB-595
TYPE SCRIPT
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/FDB-595.sh
TEST_DEPENDS fdb_test_remote_cleanup
ENVIRONMENT "${test_environment}"
TEST_PROPERTIES
RESOURCE_LOCK fdb_remote_tests # Prevent concurrent runs of remote tests
Expand Down
1 change: 1 addition & 0 deletions tests/regressions/FDB-610/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ ecbuild_add_test(
TARGET FDB-610
TYPE SCRIPT
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/FDB-610.sh
TEST_DEPENDS fdb_test_remote_cleanup
ENVIRONMENT "${test_environment}"
TEST_PROPERTIES
RESOURCE_LOCK fdb_remote_tests # Prevent concurrent runs of remote tests
Expand Down
Loading