From 40c60f6b1d7d38290cddaaffd7bc34849721014c Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 22 Mar 2013 20:18:56 +0100 Subject: Add --all option to interposetest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test all possible proxy mode combinations only when --all is given. Signed-off-by: Günther Deschner Reviewed-by: Simo Sorce --- proxy/tests/interposetest.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'proxy/tests/interposetest.c') diff --git a/proxy/tests/interposetest.c b/proxy/tests/interposetest.c index ed286d6..1acbd14 100644 --- a/proxy/tests/interposetest.c +++ b/proxy/tests/interposetest.c @@ -198,12 +198,16 @@ static int setup_gssproxy_behavior(int proxy_mode) { const char *env; + if (getenv(GSSPROXY_BEHAVIOR_ENV)) { + return 0; + } + env = lookup_gssproxy_behavior(proxy_mode); if (env == NULL) { return -1; } - return setenv("GSSPROXY_BEHAVIOR", env, 0); + return setenv(GSSPROXY_BEHAVIOR_ENV, env, 0); } struct aproc { @@ -893,6 +897,7 @@ int main(int argc, const char *argv[]) int opt; poptContext pc; int opt_version = 0; + int opt_all = 0; char *opt_target = NULL; int ret, i, k; @@ -902,6 +907,8 @@ int main(int argc, const char *argv[]) _("Specify the target name used for the tests"), NULL}, \ {"version", '\0', POPT_ARG_NONE, &opt_version, 0, \ _("Print version number and exit"), NULL }, \ + {"all", '\0', POPT_ARG_NONE, &opt_all, 0, \ + _("Test all gssproxy modes"), NULL }, \ POPT_TABLEEND }; @@ -927,6 +934,12 @@ int main(int argc, const char *argv[]) return 1; } + if (!opt_all) { + return run_cli_srv_test(PROXY_LOCAL_ONLY, + PROXY_LOCAL_ONLY, + opt_target); + } + for (i=0; i<4; i++) { for (k=0; k<4; k++) { ret = run_cli_srv_test(i, k, opt_target); -- cgit