diff options
author | Simon Warta <[email protected]> | 2015-07-15 00:33:43 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-07-15 00:33:43 +0200 |
commit | d6ee37b106ffdb4d5c07d9f58ae1845b98125afe (patch) | |
tree | 39ce4b147e43a0578bebdce1e75ac1c7a2e56d18 /src/tests | |
parent | cadcfbf1bdcbf1377d117eb81402ae1b9f3c3f04 (diff) |
Check if there are test vector files in a given test dir
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/tests.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tests/tests.cpp b/src/tests/tests.cpp index ebb34227d..0599def2a 100644 --- a/src/tests/tests.cpp +++ b/src/tests/tests.cpp @@ -28,8 +28,14 @@ size_t run_tests_in_dir(const std::string& dir, std::function<size_t (const std: { size_t fails = 0; - for(auto vec: Botan::list_all_readable_files_in_or_under(dir)) - fails += fn(vec); + auto files = Botan::list_all_readable_files_in_or_under(dir); + if (files.empty()) + { + std::cout << "Warning: No test files found in '" << dir << "'" << std::endl; + } + + for(const auto file: files) + fails += fn(file); return fails; } |