diff options
author | harsha <harsha@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-12-04 09:51:51 +0000 |
---|---|---|
committer | harsha <harsha@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-12-04 09:51:51 +0000 |
commit | 2ce7fcd1cb7e8bc01c0a576a8af24d6ee7ff85f6 (patch) | |
tree | 90ccfecb2b19ea7a5216b5cf2896e213afc34aad | |
parent | 1fb11578d4b7d7823d791903a4968882aa5cd8a0 (diff) |
- mark test as skipped
git-svn-id: https://gnunet.org/svn/gnunet@25215 140774ce-b5e7-0310-ab8b-a85725594a96
-rw-r--r-- | src/testbed/test_testbed_api_controllerlink.c | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/src/testbed/test_testbed_api_controllerlink.c b/src/testbed/test_testbed_api_controllerlink.c index 7bcb8b5a7c..9e8745fc63 100644 --- a/src/testbed/test_testbed_api_controllerlink.c +++ b/src/testbed/test_testbed_api_controllerlink.c @@ -168,8 +168,12 @@ enum Stage /** * Destory master peer and mark test as success */ - SUCCESS + SUCCESS, + /** + * Marks test as skipped + */ + SKIP }; /** @@ -654,9 +658,14 @@ host_habitable_cb (void *cls, const struct GNUNET_TESTBED_Host *_host, int statu hc_handle = NULL; if (GNUNET_NO == status) { - LOG (GNUNET_ERROR_TYPE_ERROR, "Cannot start testbed on localhost\n"); + (void) PRINTF ("%s", + "Unable to run the test as this system is not configured " + "to use password less SSH logins to localhost.\n" + "Skipping test\n"); GNUNET_SCHEDULER_cancel (abort_task); - abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL); + abort_task = GNUNET_SCHEDULER_NO_TASK; + (void) GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); + result = SKIP; return; } cp = GNUNET_TESTBED_controller_start ("127.0.0.1", host, cfg, status_cb, @@ -688,7 +697,7 @@ run (void *cls, char *const *args, const char *cfgfile, "Unable to run the test as this system is not configured " "to use password less SSH logins to localhost.\n" "Marking test as successful\n"); - result = SUCCESS; + result = SKIP; return; } cfg = GNUNET_CONFIGURATION_dup (config); @@ -719,9 +728,17 @@ main (int argc, char **argv) GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2, "test_testbed_api_controllerlink", "nohelp", options, &run, NULL); - if ((GNUNET_OK != ret) || (SUCCESS != result)) + if (GNUNET_OK != ret) return 1; - return 0; + switch (result) + { + case SUCCESS: + return 0; + case SKIP: + return 77; /* Mark test as skipped */ + default: + return 1; + } } /* end of test_testbed_api_controllerlink.c */ |