Skip to content
Merged
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ecbuild_add_option( FEATURE FDB_DOCUMENTATION

set( PERSISTENT_NAMESPACE "eckit" CACHE INTERNAL "" ) # needed for generating .b files for persistent support

ecbuild_find_package( NAME eckit VERSION 1.32 REQUIRED )
ecbuild_find_package( NAME eckit VERSION 1.33 REQUIRED )

### GRIB support

Expand Down
28 changes: 4 additions & 24 deletions src/dummy_daos/daos.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "eckit/io/Length.h"
#include "eckit/log/TimeStamp.h"
#include "eckit/runtime/Main.h"
#include "eckit/testing/Filesystem.h"
#include "eckit/types/UUID.h"
#include "eckit/utils/MD5.h"

Expand All @@ -35,27 +36,6 @@

using eckit::PathName;

namespace {
void deldir(eckit::PathName& p) {
if (!p.exists()) {
return;
}

std::vector<eckit::PathName> files;
std::vector<eckit::PathName> dirs;
p.children(files, dirs);

for (auto& f : files) {
f.unlink();
}
for (auto& d : dirs) {
deldir(d);
}

p.rmdir();
};
} // namespace

extern "C" {

//----------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -339,7 +319,7 @@ int daos_cont_create_with_label(daos_handle_t poh, const char* label, daos_prop_
uuid_parse(found_uuid.c_str(), *uuid);
}

deldir(cont_path);
eckit::testing::deldir(cont_path);

return 0;
}
Expand Down Expand Up @@ -403,7 +383,7 @@ int daos_cont_destroy(daos_handle_t poh, const char* cont, int force, daos_event

try {

deldir(realpath);
eckit::testing::deldir(realpath);
}
catch (eckit::FailedSystemCall& e) {

Expand Down Expand Up @@ -573,7 +553,7 @@ int daos_kv_destroy(daos_handle_t oh, daos_handle_t th, daos_event_t* ev) {

try {

deldir(oh.impl->path);
eckit::testing::deldir(oh.impl->path);
}
catch (eckit::FailedSystemCall& e) {

Expand Down
26 changes: 3 additions & 23 deletions src/dummy_daos/daos/tests_lib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,12 @@
#include "eckit/filesystem/TmpDir.h"
#include "eckit/log/TimeStamp.h"
#include "eckit/runtime/Main.h"
#include "eckit/testing/Filesystem.h"
#include "eckit/utils/MD5.h"

#include "../dummy_daos.h"
#include "tests_lib.h"

namespace {
void deldir(eckit::PathName& p) {
if (!p.exists()) {
return;
}

std::vector<eckit::PathName> files;
std::vector<eckit::PathName> dirs;
p.children(files, dirs);

for (auto& f : files) {
f.unlink();
}
for (auto& d : dirs) {
deldir(d);
}

p.rmdir();
};
} // namespace

//----------------------------------------------------------------------------------------------------------------------

extern "C" {
Expand Down Expand Up @@ -176,7 +156,7 @@ int dmg_pool_create(const char* dmg_config_file, uid_t uid, gid_t gid, const cha

if (errno == EEXIST) { // link path already exists due to race condition

deldir(pool_path);
eckit::testing::deldir(pool_path);
return -1;
}
else { // symlink fails for unknown reason
Expand Down Expand Up @@ -219,7 +199,7 @@ int dmg_pool_destroy(const char* dmg_config_file, const uuid_t uuid, const char*
}
}

deldir(pool_path);
eckit::testing::deldir(pool_path);

return 0;
}
Expand Down
1 change: 1 addition & 0 deletions tests/fdb/api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ list( APPEND api_tests
callback
auxiliary
select_exclude
wipe
)

foreach( _test ${api_tests} )
Expand Down
Loading
Loading