diff options
author | Jack Lloyd <[email protected]> | 2016-12-24 21:21:39 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-12-24 21:21:39 -0500 |
commit | 0f3bf4d4d056c41b585b62145d03e1588c24fcec (patch) | |
tree | 24ea7b692eba2f279b3aae9913cf21fe2241f93e /src/tests/tests.h | |
parent | 2ee2d884167e43f84830cd45af63ddbf245b540b (diff) |
Add test option --run-long-tests
Previously longer tests were hidden behind higher 'soak levels'
but these arbitrary cutoffs are confusing compared to a simple
short tests/long tests split.
Diffstat (limited to 'src/tests/tests.h')
-rw-r--r-- | src/tests/tests.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/tests/tests.h b/src/tests/tests.h index ce6431e35..dd7b3784b 100644 --- a/src/tests/tests.h +++ b/src/tests/tests.h @@ -328,6 +328,8 @@ class Test static std::string data_file(const std::string& what); + static std::string format_time(uint64_t nanoseconds); + template<typename Alloc> static std::vector<uint8_t, Alloc> mutate_vec(const std::vector<uint8_t, Alloc>& v, @@ -356,16 +358,16 @@ class Test return r; } - static void setup_tests(size_t soak, - bool log_succcss, + static void setup_tests(bool log_succcss, bool run_online_tests, + bool run_long_tests, const std::string& data_dir, const std::string& pkcs11_lib, Botan::RandomNumberGenerator* rng); - static size_t soak_level(); static bool log_success(); static bool run_online_tests(); + static bool run_long_tests(); static std::string pkcs11_lib(); static const std::string& data_dir(); @@ -377,8 +379,7 @@ class Test private: static std::string m_data_dir; static Botan::RandomNumberGenerator* m_test_rng; - static size_t m_soak_level; - static bool m_log_success, m_run_online_tests; + static bool m_log_success, m_run_online_tests, m_run_long_tests; static std::string m_pkcs11_lib; }; @@ -421,6 +422,10 @@ class Text_Based_Test : public Test virtual Test::Result run_one_test(const std::string& header, const VarMap& vars) = 0; + // Called before run_one_test + virtual bool skip_this_test(const std::string& header, + const VarMap& vars); + virtual std::vector<Test::Result> run_final_tests() { return std::vector<Test::Result>(); } bool get_req_bool(const VarMap& vars, const std::string& key) const; |