diff options
author | Mikhail Galanin <mgalanin@mimecast.com> | 2018-09-20 11:26:36 +0100 |
---|---|---|
committer | Mikhail Galanin <mgalanin@mimecast.com> | 2018-09-20 11:26:36 +0100 |
commit | 99b68e8e51215eab50d33b5af0e0e12b1b497e1e (patch) | |
tree | 0ac06164c3382ad931478451a1a9b8b5ce34398f /test/rspamd_test_suite.c | |
parent | d82bb62834c158a2108ceb412745b046b2990b9f (diff) | |
download | rspamd-99b68e8e51215eab50d33b5af0e0e12b1b497e1e.tar.gz rspamd-99b68e8e51215eab50d33b5af0e0e12b1b497e1e.zip |
[Test] Pass test-case patten into test engine
So that now we can set which test cases should be runned:
$ ./test/rspamd-test -p /rspamd/lua -t selectors.lua -c "case .* rcpts"
$ ./test/rspamd-test -p /rspamd/lua -c "case 1st rcpts"
-c accepts Lua-pattern
Diffstat (limited to 'test/rspamd_test_suite.c')
-rw-r--r-- | test/rspamd_test_suite.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/rspamd_test_suite.c b/test/rspamd_test_suite.c index 0be3091d9..10a5d941b 100644 --- a/test/rspamd_test_suite.c +++ b/test/rspamd_test_suite.c @@ -8,12 +8,15 @@ struct event_base *base = NULL; worker_t *workers[] = { NULL }; gchar *lua_test = NULL; +gchar *lua_test_case = NULL; gboolean verbose = FALSE; static GOptionEntry entries[] = { { "test", 't', 0, G_OPTION_ARG_STRING, &lua_test, "Lua test to run (i.e. selectors.lua)", NULL }, + { "test-case", 'c', 0, G_OPTION_ARG_STRING, &lua_test_case, + "Lua test to run, lua pattern i.e. \"case .* rcpts\"", NULL }, { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL } }; |