Skip to content

Commit c506cc0

Browse files
committed
testmemcache: Skip test if memcachedmock was not built.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.7.x@1924402 13f79535-47bb-0310-9956-ffa450edef68
1 parent 92cdf84 commit c506cc0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/testmemcache.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,14 @@ static void test_connection_validation(abts_case *tc, void *data)
699699
args[1] = NULL;
700700
rv = apr_proc_create(&proc, TESTBINPATH "memcachedmock" EXTENSION, args, NULL,
701701
procattr, p);
702-
ABTS_ASSERT(tc, "Couldn't launch program", rv == APR_SUCCESS);
702+
703+
if (APR_SUCCESS != rv) {
704+
char errbuf[128];
705+
abts_log_message(TESTBINPATH "memcachedmock" EXTENSION " could not be executed: %s",
706+
apr_strerror(rv, errbuf, sizeof(errbuf)));
707+
ABTS_SKIP(tc, data, TESTBINPATH "memcachedmock" EXTENSION " could not be executed, skipped");
708+
return;
709+
}
703710

704711
/* Wait for the mock memcached to start */
705712
apr_sleep(apr_time_from_sec(2));

0 commit comments

Comments
 (0)