aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-07-15 00:33:43 +0200
committerSimon Warta <[email protected]>2015-07-15 00:33:43 +0200
commitd6ee37b106ffdb4d5c07d9f58ae1845b98125afe (patch)
tree39ce4b147e43a0578bebdce1e75ac1c7a2e56d18 /src/tests
parentcadcfbf1bdcbf1377d117eb81402ae1b9f3c3f04 (diff)
Check if there are test vector files in a given test dir
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/tests.cpp10
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;
}