aboutsummaryrefslogtreecommitdiff
path: root/tests/torture.h
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2014-09-02 09:07:17 +0200
committerAndreas Schneider <asn@cryptomilk.org>2015-02-02 17:34:15 +0100
commitd42a1a35b0c2f2178e459b9328f97f9e988a1cb0 (patch)
tree509cf5ffb852bead71db43dc1b183686aadc6dda /tests/torture.h
parent8af829a42aea835219113e13a176fa36a397db35 (diff)
downloadlibssh-d42a1a35b0c2f2178e459b9328f97f9e988a1cb0.tar.gz
libssh-d42a1a35b0c2f2178e459b9328f97f9e988a1cb0.tar.xz
libssh-d42a1a35b0c2f2178e459b9328f97f9e988a1cb0.zip
tests: allow conditionnal execution on pattern
Option can be used to filter out irrelevant tests usage: ./torture_pki '*ed25519' Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'tests/torture.h')
-rw-r--r--tests/torture.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/torture.h b/tests/torture.h
index e1738ab0..f5897561 100644
--- a/tests/torture.h
+++ b/tests/torture.h
@@ -42,7 +42,7 @@
/* Used by main to communicate with parse_opt. */
struct argument_s {
- char *args[2];
+ const char *pattern;
int verbose;
};
@@ -83,6 +83,9 @@ const char *torture_get_testkey_passphrase(void);
void torture_write_file(const char *filename, const char *data);
+#define torture_filter_tests(tests) _torture_filter_tests(tests, sizeof(tests) / sizeof(tests)[0])
+void _torture_filter_tests(UnitTest *tests, size_t ntests);
+
/*
* This function must be defined in every unit test file.
*/