diff options
author | Günther Deschner <gdeschner@redhat.com> | 2013-03-22 20:18:56 +0100 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2013-04-23 12:01:51 -0700 |
commit | 40c60f6b1d7d38290cddaaffd7bc34849721014c (patch) | |
tree | 55f1cab94a4afe857f010c5aef1227595a961271 /proxy/tests | |
parent | d53d7740cc26366cd41d262718bb9304da2c9917 (diff) | |
download | gss-proxy-40c60f6b1d7d38290cddaaffd7bc34849721014c.tar.gz gss-proxy-40c60f6b1d7d38290cddaaffd7bc34849721014c.tar.xz gss-proxy-40c60f6b1d7d38290cddaaffd7bc34849721014c.zip |
Add --all option to interposetest
test all possible proxy mode combinations only when --all is given.
Signed-off-by: Günther Deschner <gdeschner@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'proxy/tests')
-rw-r--r-- | proxy/tests/interposetest.c | 15 |
1 files changed, 14 insertions, 1 deletions
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); |