@@ -31,22 +31,22 @@ Test_Runner::Test_Runner(std::ostream& out) : m_output(out) {}
3131
3232Test_Runner::~Test_Runner () = default ;
3333
34- bool Test_Runner::run (const Test_Options& opts ) {
35- if (!opts .no_stdout ()) {
36- m_reporters.emplace_back (std::make_unique<StdoutReporter>(opts , output ()));
34+ bool Test_Runner::run (const Test_Options& options ) {
35+ if (!options .no_stdout ()) {
36+ m_reporters.emplace_back (std::make_unique<StdoutReporter>(options , output ()));
3737 }
38- if (!opts .xml_results_dir ().empty ()) {
38+ if (!options .xml_results_dir ().empty ()) {
3939#if defined(BOTAN_TARGET_OS_HAS_FILESYSTEM)
40- m_reporters.emplace_back (std::make_unique<XmlReporter>(opts, opts .xml_results_dir ()));
40+ m_reporters.emplace_back (std::make_unique<XmlReporter>(options, options .xml_results_dir ()));
4141#else
4242 output () << " Generating test report files is not supported on this platform\n " ;
4343#endif
4444 }
4545
46- auto req = Botan_Tests::Test::filter_registered_tests (opts .requested_tests (), opts .skip_tests ());
46+ auto req = Botan_Tests::Test::filter_registered_tests (options .requested_tests (), options .skip_tests ());
4747
4848 // TODO: Test runner should not be aware of certain test's environmental requirements.
49- if (opts .pkcs11_lib ().empty ()) {
49+ if (options .pkcs11_lib ().empty ()) {
5050 // do not run pkcs11 tests by default unless pkcs11-lib set
5151 for (auto iter = req.begin (); iter != req.end ();) {
5252 if ((*iter).find (" pkcs11" ) != std::string::npos) {
@@ -61,7 +61,7 @@ bool Test_Runner::run(const Test_Options& opts) {
6161 throw Test_Error (" No tests to run" );
6262 }
6363
64- std::vector<uint8_t > seed = Botan::hex_decode (opts .drbg_seed ());
64+ std::vector<uint8_t > seed = Botan::hex_decode (options .drbg_seed ());
6565 if (seed.empty ()) {
6666 const uint64_t ts = Botan_Tests::Test::timestamp ();
6767 seed.resize (8 );
@@ -76,28 +76,28 @@ bool Test_Runner::run(const Test_Options& opts) {
7676 }
7777#endif
7878
79- if (!opts .pkcs11_lib ().empty ()) {
80- reporter->set_property (" pkcs11 library" , opts .pkcs11_lib ());
79+ if (!options .pkcs11_lib ().empty ()) {
80+ reporter->set_property (" pkcs11 library" , options .pkcs11_lib ());
8181 }
8282
83- if (!opts .provider ().empty ()) {
84- reporter->set_property (" provider" , opts .provider ());
83+ if (!options .provider ().empty ()) {
84+ reporter->set_property (" provider" , options .provider ());
8585 }
8686
8787 reporter->set_property (" drbg_seed" , Botan::hex_encode (seed));
8888 }
8989
90- Botan_Tests::Test::set_test_options (opts );
90+ Botan_Tests::Test::set_test_options (options );
9191
92- for (size_t i = 0 ; i != opts .test_runs (); ++i) {
92+ for (size_t i = 0 ; i != options .test_runs (); ++i) {
9393 Botan_Tests::Test::set_test_rng_seed (seed, i);
9494
9595 for (const auto & reporter : m_reporters) {
9696 reporter->next_test_run ();
9797 }
9898
9999 const bool passed =
100- (opts .test_threads () == 1 ) ? run_tests (req) : run_tests_multithreaded (req, opts .test_threads ());
100+ (options .test_threads () == 1 ) ? run_tests (req) : run_tests_multithreaded (req, options .test_threads ());
101101
102102 for (const auto & reporter : m_reporters) {
103103 reporter->render ();
0 commit comments