merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 13eb40e3bcc935dc39a03d071f8ab2391c8c085e
parent 1b659e915f1fc87125c852a1d9dfe1e112a7389a
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri, 20 May 2016 15:08:03 +0200

use pax format for 'make dist' so that longer filenames are not excluded by chance

Diffstat:
Mconfigure.ac | 2+-
Msrc/lib/test_merchant_api.c | 43+++++++++++++++++++++++++++++++++++--------
2 files changed, 36 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac @@ -8,7 +8,7 @@ AC_INIT([taler-merchant], [0.0.0], [taler-bug@gnunet.org]) AC_CONFIG_SRCDIR([src/backend/taler-merchant-httpd.c]) AC_CONFIG_HEADERS([taler_merchant_config.h]) # support for non-recursive builds -AM_INIT_AUTOMAKE([subdir-objects]) +AM_INIT_AUTOMAKE([subdir-objects 1.9 tar-pax]) # pretty build rules AM_SILENT_RULES([yes]) diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c @@ -1509,6 +1509,7 @@ main (int argc, struct GNUNET_OS_Process *merchantd; struct TALER_MERCHANTDB_Plugin *db; struct GNUNET_CONFIGURATION_Handle *cfg; + unsigned int cnt; unsetenv ("XDG_DATA_HOME"); unsetenv ("XDG_CONFIG_HOME"); @@ -1560,18 +1561,31 @@ main (int argc, GNUNET_OS_process_wait (proc); GNUNET_OS_process_destroy (proc); exchanged = GNUNET_OS_start_process (GNUNET_NO, - GNUNET_OS_INHERIT_STD_ALL, - NULL, NULL, NULL, - "taler-exchange-httpd", - "taler-exchange-httpd", - "-c", "test_merchant_api.conf", - NULL); + GNUNET_OS_INHERIT_STD_ALL, + NULL, NULL, NULL, + "taler-exchange-httpd", + "taler-exchange-httpd", + "-c", "test_merchant_api.conf", + NULL); /* give child time to start and bind against the socket */ - fprintf (stderr, "Waiting for taler-exchange-httpd to be ready"); + fprintf (stderr, + "Waiting for taler-exchange-httpd to be ready"); + cnt = 0; do { fprintf (stderr, "."); sleep (1); + cnt++; + if (cnt > 60) + { + fprintf (stderr, + "\nFailed to start taler-exchange-httpd\n"); + GNUNET_OS_process_kill (exchanged, + SIGKILL); + GNUNET_OS_process_wait (exchanged); + GNUNET_OS_process_destroy (exchanged); + return 77; + } } while (0 != system ("wget -q -t 1 -T 1 " EXCHANGE_URI "keys -o /dev/null -O /dev/null")); fprintf (stderr, "\n"); @@ -1583,11 +1597,24 @@ main (int argc, "-c", "test_merchant_api.conf", NULL); /* give child time to start and bind against the socket */ - fprintf (stderr, "Waiting for taler-merchant-httpd to be ready"); + fprintf (stderr, + "Waiting for taler-merchant-httpd to be ready"); + cnt = 0; do { fprintf (stderr, "."); sleep (1); + cnt++; + if (cnt > 60) + { + fprintf (stderr, + "\nFailed to start taler-merchant-httpd\n"); + GNUNET_OS_process_kill (merchantd, + SIGKILL); + GNUNET_OS_process_wait (merchantd); + GNUNET_OS_process_destroy (merchantd); + return 77; + } } while (0 != system ("wget -q -t 1 -T 1 " MERCHANT_URI " -o /dev/null -O /dev/null")); fprintf (stderr, "\n");