diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-12-04 09:51:51 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-12-04 09:51:51 +0000 |
commit | e3a72a8e187862b2af1955bb595a3710e292c56a (patch) | |
tree | 90ccfecb2b19ea7a5216b5cf2896e213afc34aad /src/testbed/test_testbed_api_controllerlink.c | |
parent | 1ed3df892008fa862fd89fd5786993c4c95bc7df (diff) | |
download | gnunet-e3a72a8e187862b2af1955bb595a3710e292c56a.tar.gz gnunet-e3a72a8e187862b2af1955bb595a3710e292c56a.zip |
- mark test as skipped
Diffstat (limited to 'src/testbed/test_testbed_api_controllerlink.c')
-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 7bcb8b5a7..9e8745fc6 100644 --- a/src/testbed/test_testbed_api_controllerlink.c +++ b/src/testbed/test_testbed_api_controllerlink.c | |||
@@ -168,8 +168,12 @@ enum Stage | |||
168 | /** | 168 | /** |
169 | * Destory master peer and mark test as success | 169 | * Destory master peer and mark test as success |
170 | */ | 170 | */ |
171 | SUCCESS | 171 | SUCCESS, |
172 | 172 | ||
173 | /** | ||
174 | * Marks test as skipped | ||
175 | */ | ||
176 | SKIP | ||
173 | }; | 177 | }; |
174 | 178 | ||
175 | /** | 179 | /** |
@@ -654,9 +658,14 @@ host_habitable_cb (void *cls, const struct GNUNET_TESTBED_Host *_host, int statu | |||
654 | hc_handle = NULL; | 658 | hc_handle = NULL; |
655 | if (GNUNET_NO == status) | 659 | if (GNUNET_NO == status) |
656 | { | 660 | { |
657 | LOG (GNUNET_ERROR_TYPE_ERROR, "Cannot start testbed on localhost\n"); | 661 | (void) PRINTF ("%s", |
662 | "Unable to run the test as this system is not configured " | ||
663 | "to use password less SSH logins to localhost.\n" | ||
664 | "Skipping test\n"); | ||
658 | GNUNET_SCHEDULER_cancel (abort_task); | 665 | GNUNET_SCHEDULER_cancel (abort_task); |
659 | abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL); | 666 | abort_task = GNUNET_SCHEDULER_NO_TASK; |
667 | (void) GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); | ||
668 | result = SKIP; | ||
660 | return; | 669 | return; |
661 | } | 670 | } |
662 | cp = GNUNET_TESTBED_controller_start ("127.0.0.1", host, cfg, status_cb, | 671 | 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, | |||
688 | "Unable to run the test as this system is not configured " | 697 | "Unable to run the test as this system is not configured " |
689 | "to use password less SSH logins to localhost.\n" | 698 | "to use password less SSH logins to localhost.\n" |
690 | "Marking test as successful\n"); | 699 | "Marking test as successful\n"); |
691 | result = SUCCESS; | 700 | result = SKIP; |
692 | return; | 701 | return; |
693 | } | 702 | } |
694 | cfg = GNUNET_CONFIGURATION_dup (config); | 703 | cfg = GNUNET_CONFIGURATION_dup (config); |
@@ -719,9 +728,17 @@ main (int argc, char **argv) | |||
719 | GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2, | 728 | GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2, |
720 | "test_testbed_api_controllerlink", "nohelp", options, | 729 | "test_testbed_api_controllerlink", "nohelp", options, |
721 | &run, NULL); | 730 | &run, NULL); |
722 | if ((GNUNET_OK != ret) || (SUCCESS != result)) | 731 | if (GNUNET_OK != ret) |
723 | return 1; | 732 | return 1; |
724 | return 0; | 733 | switch (result) |
734 | { | ||
735 | case SUCCESS: | ||
736 | return 0; | ||
737 | case SKIP: | ||
738 | return 77; /* Mark test as skipped */ | ||
739 | default: | ||
740 | return 1; | ||
741 | } | ||
725 | } | 742 | } |
726 | 743 | ||
727 | /* end of test_testbed_api_controllerlink.c */ | 744 | /* end of test_testbed_api_controllerlink.c */ |