diff options
Diffstat (limited to 'regress/unittests/test_helper/test_helper.c')
-rw-r--r-- | regress/unittests/test_helper/test_helper.c | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/regress/unittests/test_helper/test_helper.c b/regress/unittests/test_helper/test_helper.c index 4cc70852c0445..e7a47b265a8db 100644 --- a/regress/unittests/test_helper/test_helper.c +++ b/regress/unittests/test_helper/test_helper.c @@ -1,4 +1,4 @@ -/* $OpenBSD: test_helper.c,v 1.8 2018/02/08 08:46:20 djm Exp $ */ +/* $OpenBSD: test_helper.c,v 1.11 2018/11/23 02:53:57 dtucker Exp $ */ /* * Copyright (c) 2011 Damien Miller <djm@mindrot.org> * @@ -35,11 +35,13 @@ #include <signal.h> #include <openssl/bn.h> +#include <openssl/err.h> #if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) && !defined(BROKEN_STRNVIS) # include <vis.h> #endif +#include "entropy.h" #include "test_helper.h" #include "atomicio.h" @@ -115,12 +117,17 @@ static test_onerror_func_t *test_onerror = NULL; static void *onerror_ctx = NULL; static const char *data_dir = NULL; static char subtest_info[512]; +static int fast = 0; +static int slow = 0; int main(int argc, char **argv) { int ch; + seed_rng(); + ERR_load_CRYPTO_strings(); + /* Handle systems without __progname */ if (__progname == NULL) { __progname = strrchr(argv[0], '/'); @@ -134,8 +141,14 @@ main(int argc, char **argv) } } - while ((ch = getopt(argc, argv, "vqd:")) != -1) { + while ((ch = getopt(argc, argv, "Ffvqd:")) != -1) { switch (ch) { + case 'F': + slow = 1; + break; + case 'f': + fast = 1; + break; case 'd': data_dir = optarg; break; @@ -167,17 +180,29 @@ main(int argc, char **argv) } int -test_is_verbose() +test_is_verbose(void) { return verbose_mode; } int -test_is_quiet() +test_is_quiet(void) { return quiet_mode; } +int +test_is_fast(void) +{ + return fast; +} + +int +test_is_slow(void) +{ + return slow; +} + const char * test_data_file(const char *name) { |