diff options
Diffstat (limited to 'regress/unittests/test_helper/test_helper.c')
-rw-r--r-- | regress/unittests/test_helper/test_helper.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/regress/unittests/test_helper/test_helper.c b/regress/unittests/test_helper/test_helper.c index 4cc70852c..6200ccd58 100644 --- a/regress/unittests/test_helper/test_helper.c +++ b/regress/unittests/test_helper/test_helper.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: test_helper.c,v 1.8 2018/02/08 08:46:20 djm Exp $ */ | 1 | /* $OpenBSD: test_helper.c,v 1.9 2018/10/17 23:28:05 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2011 Damien Miller <djm@mindrot.org> | 3 | * Copyright (c) 2011 Damien Miller <djm@mindrot.org> |
4 | * | 4 | * |
@@ -115,6 +115,8 @@ static test_onerror_func_t *test_onerror = NULL; | |||
115 | static void *onerror_ctx = NULL; | 115 | static void *onerror_ctx = NULL; |
116 | static const char *data_dir = NULL; | 116 | static const char *data_dir = NULL; |
117 | static char subtest_info[512]; | 117 | static char subtest_info[512]; |
118 | static int fast = 0; | ||
119 | static int slow = 0; | ||
118 | 120 | ||
119 | int | 121 | int |
120 | main(int argc, char **argv) | 122 | main(int argc, char **argv) |
@@ -134,8 +136,14 @@ main(int argc, char **argv) | |||
134 | } | 136 | } |
135 | } | 137 | } |
136 | 138 | ||
137 | while ((ch = getopt(argc, argv, "vqd:")) != -1) { | 139 | while ((ch = getopt(argc, argv, "Ffvqd:")) != -1) { |
138 | switch (ch) { | 140 | switch (ch) { |
141 | case 'F': | ||
142 | slow = 1; | ||
143 | break; | ||
144 | case 'f': | ||
145 | fast = 1; | ||
146 | break; | ||
139 | case 'd': | 147 | case 'd': |
140 | data_dir = optarg; | 148 | data_dir = optarg; |
141 | break; | 149 | break; |
@@ -167,17 +175,29 @@ main(int argc, char **argv) | |||
167 | } | 175 | } |
168 | 176 | ||
169 | int | 177 | int |
170 | test_is_verbose() | 178 | test_is_verbose(void) |
171 | { | 179 | { |
172 | return verbose_mode; | 180 | return verbose_mode; |
173 | } | 181 | } |
174 | 182 | ||
175 | int | 183 | int |
176 | test_is_quiet() | 184 | test_is_quiet(void) |
177 | { | 185 | { |
178 | return quiet_mode; | 186 | return quiet_mode; |
179 | } | 187 | } |
180 | 188 | ||
189 | int | ||
190 | test_is_fast(void) | ||
191 | { | ||
192 | return fast; | ||
193 | } | ||
194 | |||
195 | int | ||
196 | test_is_slow(void) | ||
197 | { | ||
198 | return slow; | ||
199 | } | ||
200 | |||
181 | const char * | 201 | const char * |
182 | test_data_file(const char *name) | 202 | test_data_file(const char *name) |
183 | { | 203 | { |