aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/main.cpp
diff options
context:
space:
mode:
authorMatthias Gierlings <[email protected]>2018-04-06 20:20:35 +0200
committerMatthias Gierlings <[email protected]>2018-04-06 20:25:45 +0200
commit4476c07bae00dc2cec5183878d81b3e53ff3b97e (patch)
tree2ab30848e3a561f5999a196187aebdcbafae3faf /src/tests/main.cpp
parent4292f41101bb86d528252d8395ffb93eb9fa3528 (diff)
Make tests pass by default in UBSAN mode
- Adds macros to check if botan was compiled with a certain sanitizers. - Automatically excludes the tests that are intended to provoke undefined behaviour from the test bench, when botan is compiled with UBSAN. - Changes option `--avoid-undefined` to `--no-avoid-undefined` so the failing tests can be explicitly activated when needed.
Diffstat (limited to 'src/tests/main.cpp')
-rw-r--r--src/tests/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/main.cpp b/src/tests/main.cpp
index 5cf4e4fe3..0e0360783 100644
--- a/src/tests/main.cpp
+++ b/src/tests/main.cpp
@@ -60,7 +60,7 @@ int main(int argc, char* argv[])
{
const std::string arg_spec =
"botan-test --verbose --help --data-dir= --pkcs11-lib= --provider= "
- "--log-success --abort-on-first-fail --avoid-undefined "
+ "--log-success --abort-on-first-fail --no-avoid-undefined "
"--run-long-tests --run-online-tests --test-runs=1 --drbg-seed= "
"*suites";
@@ -85,7 +85,7 @@ int main(int argc, char* argv[])
parser.flag_set("run-online-tests"),
parser.flag_set("run-long-tests"),
parser.flag_set("abort-on-first-fail"),
- parser.flag_set("avoid-undefined"));
+ parser.flag_set("no-avoid-undefined"));
#if defined(BOTAN_HAS_OPENSSL)
if(opts.provider().empty() || opts.provider() == "openssl")