diff options
author | lloyd <[email protected]> | 2015-05-12 02:21:48 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2015-05-12 02:21:48 +0000 |
commit | c83335a69b15434e7aba04d28401b978f4d4b3e9 (patch) | |
tree | 16353e0ddd5b95cc2cca9972ecb7e64a7d28f6da | |
parent | 8965d79d362434f638369edc8fa62e77f2c40143 (diff) |
Skip the NIST X.509 tests if the FS code is not available. Previously
would fail with a very unhelpful message.
-rw-r--r-- | src/tests/nist_x509.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/tests/nist_x509.cpp b/src/tests/nist_x509.cpp index e6792512c..5572c276a 100644 --- a/src/tests/nist_x509.cpp +++ b/src/tests/nist_x509.cpp @@ -37,6 +37,13 @@ size_t test_nist_x509() const std::string root_test_dir = "src/tests/data/nist_x509/"; const size_t total_tests = 76; + if(list_all_readable_files_in_or_under(root_test_dir).empty()) + { + std::cout << "No FS access, skipping NIST X.509 validation tests\n"; + test_report("NIST X.509 path validation", 0, 0); + return; + } + size_t unexp_failure = 0; size_t unexp_success = 0; size_t wrong_error = 0; @@ -133,7 +140,7 @@ size_t test_nist_x509() catch(std::exception& e) { std::cout << e.what() << std::endl; - return 1; + ++unexp_failures; } const size_t all_failures = unexp_failure + unexp_success + wrong_error; |