summaryrefslogtreecommitdiff
path: root/tests/online/clone.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2014-04-02 09:47:35 -0700
committerRussell Belfer <rb@github.com>2014-04-02 09:47:35 -0700
commit2e9c07f5eda5070bdcf9f962809375e5e3c561bb (patch)
tree0581602ed3fbcf7474366a88e100fb4f3017726c /tests/online/clone.c
parentada157b2375bea8ed0c7a71320a3325a9903ebd7 (diff)
downloadlibgit2-rb/dont-count-on-libgit2-source.tar.gz
Create cl_skip macro and use it to skip testsrb/dont-count-on-libgit2-source
There are a few tests that we need to skip in some cases. This adds a cl_skip macro to return from the current test and print a nicely formatted reason for doing so.
Diffstat (limited to 'tests/online/clone.c')
-rw-r--r--tests/online/clone.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/tests/online/clone.c b/tests/online/clone.c
index 9919e8b06..fd39afbd4 100644
--- a/tests/online/clone.c
+++ b/tests/online/clone.c
@@ -200,15 +200,10 @@ void test_online_clone__cred_callback_failure_return_code_is_tunnelled(void)
const char *remote_url = cl_getenv("GITTEST_REMOTE_URL");
const char *remote_user = cl_getenv("GITTEST_REMOTE_USER");
- if (!remote_url) {
- printf("GITTEST_REMOTE_URL unset; skipping clone test\n");
- return;
- }
-
- if (!remote_user) {
- printf("GITTEST_REMOTE_USER unset; skipping clone test\n");
- return;
- }
+ if (!remote_url)
+ cl_skip("GITTEST_REMOTE_URL unset");
+ if (!remote_user)
+ cl_skip("GITTEST_REMOTE_USER unset");
g_options.remote_callbacks.credentials = cred_failure_cb;