skip test if talercheck DB does not exist
This commit is contained in:
parent
6d65457203
commit
296145fb26
@ -1,5 +1,9 @@
|
|||||||
# This Makefile.am is in the public domain
|
# This Makefile.am is in the public domain
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_srcdir)/src/bank-lib/
|
AM_CPPFLAGS = \
|
||||||
|
-I$(top_srcdir)/src/include \
|
||||||
|
-I$(top_srcdir)/src/bank-lib/ \
|
||||||
|
$(LIBGCRYPT_CFLAGS) \
|
||||||
|
$(POSTGRESQL_CPPFLAGS)
|
||||||
|
|
||||||
if USE_COVERAGE
|
if USE_COVERAGE
|
||||||
AM_CFLAGS = --coverage -O0
|
AM_CFLAGS = --coverage -O0
|
||||||
@ -112,6 +116,7 @@ test_taler_exchange_wirewatch_postgres_LDADD = \
|
|||||||
-lmicrohttpd \
|
-lmicrohttpd \
|
||||||
-lgnunetutil \
|
-lgnunetutil \
|
||||||
-lgnunetjson \
|
-lgnunetjson \
|
||||||
|
-lgnunetpq \
|
||||||
-ljansson \
|
-ljansson \
|
||||||
-lpthread
|
-lpthread
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "taler_util.h"
|
#include "taler_util.h"
|
||||||
#include <gnunet/gnunet_json_lib.h>
|
#include <gnunet/gnunet_json_lib.h>
|
||||||
|
#include <gnunet/gnunet_pq_lib.h>
|
||||||
#include "taler_json_lib.h"
|
#include "taler_json_lib.h"
|
||||||
#include <microhttpd.h>
|
#include <microhttpd.h>
|
||||||
#include "taler_fakebank_lib.h"
|
#include "taler_fakebank_lib.h"
|
||||||
@ -791,6 +792,20 @@ main (int argc,
|
|||||||
GNUNET_log_setup ("test_taler_exchange_wirewatch",
|
GNUNET_log_setup ("test_taler_exchange_wirewatch",
|
||||||
"WARNING",
|
"WARNING",
|
||||||
NULL);
|
NULL);
|
||||||
|
/* check database is working */
|
||||||
|
{
|
||||||
|
struct GNUNET_PQ_Context *conn;
|
||||||
|
struct GNUNET_PQ_ExecuteStatement es[] = {
|
||||||
|
GNUNET_PQ_EXECUTE_STATEMENT_END
|
||||||
|
};
|
||||||
|
|
||||||
|
conn = GNUNET_PQ_connect ("postgres:///talercheck",
|
||||||
|
es,
|
||||||
|
NULL);
|
||||||
|
if (NULL == conn)
|
||||||
|
return 77;
|
||||||
|
GNUNET_PQ_disconnect (conn);
|
||||||
|
}
|
||||||
proc = GNUNET_OS_start_process (GNUNET_NO,
|
proc = GNUNET_OS_start_process (GNUNET_NO,
|
||||||
GNUNET_OS_INHERIT_STD_ALL,
|
GNUNET_OS_INHERIT_STD_ALL,
|
||||||
NULL, NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
|
Loading…
Reference in New Issue
Block a user