From e021c6ee92d4a1f98465db2a47e3330c27322d47 Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Fri, 31 Mar 2017 15:15:15 +0200 Subject: Filter provider in test loops, skip text based without provider. The tests for block, hash, stream, pubkey, and mac loop over all possible crypto providers. If a specific provider is given on the botan-test command line, use only this one. If the provider to be tested is restricted, skip text based tests that do not have a possible provider. --- src/tests/tests.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/tests/tests.cpp') diff --git a/src/tests/tests.cpp b/src/tests/tests.cpp index a7de5c45e..fe97a2a7a 100644 --- a/src/tests/tests.cpp +++ b/src/tests/tests.cpp @@ -849,6 +849,11 @@ parse_cpuid_bits(const std::vector& tok) } +std::vector Text_Based_Test::possible_providers(const std::string&) + { + return Test::provider_filter({ "base" }); + } + bool Text_Based_Test::skip_this_test(const std::string& /*header*/, const VarMap& /*vars*/) { @@ -920,7 +925,8 @@ std::vector Text_Based_Test::run() { try { - if(skip_this_test(header, vars)) + if(possible_providers(header).empty() || + skip_this_test(header, vars)) { continue; } @@ -963,6 +969,11 @@ std::vector Text_Based_Test::run() } } + if(results.empty()) + { + return results; + } + try { std::vector final_tests = run_final_tests(); -- cgit v1.2.3