aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-01-12 20:51:42 +0100
committerChristian Grothoff <christian@grothoff.org>2020-01-12 20:51:42 +0100
commitca55b5078f1b8331bbe571209beff24c914b6b33 (patch)
tree241b5d8a9c670333dafa95aee53bdbe2d97278c1 /src
parent1788ca2be11b92f9c92d8b7ad31383f663608ac0 (diff)
restructure tests and build system
Diffstat (limited to 'src')
-rw-r--r--src/exchange/Makefile.am49
-rw-r--r--src/lib/Makefile.am194
-rw-r--r--src/lib/test-taler-exchange-aggregator-postgres.conf (renamed from src/exchange/test-taler-exchange-aggregator-postgres.conf)0
-rw-r--r--src/lib/test-taler-exchange-wirewatch-postgres.conf (renamed from src/exchange/test-taler-exchange-wirewatch-postgres.conf)0
-rw-r--r--src/lib/test_taler_exchange_aggregator.c (renamed from src/exchange/test_taler_exchange_aggregator.c)0
-rw-r--r--src/lib/test_taler_exchange_wirewatch.c (renamed from src/exchange/test_taler_exchange_wirewatch.c)0
6 files changed, 121 insertions, 122 deletions
diff --git a/src/exchange/Makefile.am b/src/exchange/Makefile.am
index b08c85c6f..92bbb90d8 100644
--- a/src/exchange/Makefile.am
+++ b/src/exchange/Makefile.am
@@ -15,6 +15,8 @@ pkgcfgdir = $(prefix)/share/taler/config.d/
pkgcfg_DATA = \
exchange.conf
+# Programs
+
bin_PROGRAMS = \
taler-exchange-aggregator \
taler-exchange-httpd \
@@ -88,57 +90,24 @@ taler_exchange_httpd_SOURCES += \
taler-exchange-httpd_test.c taler-exchange-httpd_test.h
endif
+
+# Testcases
+
+AM_TESTS_ENVIRONMENT=export TALER_PREFIX=$${TALER_PREFIX:-@libdir@};export PATH=$${TALER_PREFIX:-@prefix@}/bin:$$PATH;
+
check_SCRIPTS = \
test_taler_exchange_httpd.sh
-
if HAVE_EXPENSIVE_TESTS
check_SCRIPTS += \
test_taler_exchange_httpd_afl.sh
endif
-test_taler_exchange_aggregator_postgres_SOURCES = \
- test_taler_exchange_aggregator.c
-test_taler_exchange_aggregator_postgres_LDADD = \
- $(LIBGCRYPT_LIBS) \
- $(top_builddir)/src/exchangedb/libtalerexchangedb.la \
- $(top_builddir)/src/bank-lib/libtalerfakebank.la \
- $(top_builddir)/src/json/libtalerjson.la \
- $(top_builddir)/src/util/libtalerutil.la \
- -lmicrohttpd \
- -lgnunetutil \
- -lgnunetjson \
- -ljansson \
- -lpthread
-
-test_taler_exchange_wirewatch_postgres_SOURCES = \
- test_taler_exchange_wirewatch.c
-test_taler_exchange_wirewatch_postgres_LDADD = \
- $(LIBGCRYPT_LIBS) \
- $(top_builddir)/src/exchangedb/libtalerexchangedb.la \
- $(top_builddir)/src/bank-lib/libtalerfakebank.la \
- $(top_builddir)/src/json/libtalerjson.la \
- $(top_builddir)/src/util/libtalerutil.la \
- -lmicrohttpd \
- -lgnunetutil \
- -lgnunetjson \
- -lgnunetpq \
- -ljansson \
- -lpthread
-
-check_PROGRAMS = \
- test_taler_exchange_aggregator-postgres \
- test_taler_exchange_wirewatch-postgres
-
-AM_TESTS_ENVIRONMENT=export TALER_PREFIX=$${TALER_PREFIX:-@libdir@};export PATH=$${TALER_PREFIX:-@prefix@}/bin:$$PATH;
-
TESTS = \
- $(check_SCRIPTS) \
- $(check_PROGRAMS)
+ $(check_SCRIPTS)
+# Distribution
EXTRA_DIST = \
- test-taler-exchange-aggregator-postgres.conf \
- test-taler-exchange-wirewatch-postgres.conf \
test_taler_exchange_httpd_home/.local/share/taler/exchange/offline-keys/master.priv \
test_taler_exchange_httpd.conf \
exchange.conf \
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 231e049a0..8ffee92bf 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -6,6 +6,8 @@ if USE_COVERAGE
XLIB = -lgcov
endif
+# Libraries
+
lib_LTLIBRARIES = \
libtalerauditor.la \
libtalerexchange.la \
@@ -37,7 +39,13 @@ libtalerexchange_la_LIBADD = \
-lgnunetutil \
-ljansson \
$(XLIB)
-
+if HAVE_LIBCURL
+libtalerexchange_la_LIBADD += -lcurl
+else
+if HAVE_LIBGNURL
+libtalerexchange_la_LIBADD += -lgnurl
+endif
+endif
libtalerauditor_la_LDFLAGS = \
-version-info 0:0:0 \
@@ -56,7 +64,6 @@ libtalerauditor_la_LIBADD = \
-lgnunetutil \
-ljansson \
$(XLIB)
-
if HAVE_LIBCURL
libtalerauditor_la_LIBADD += -lcurl
else
@@ -65,7 +72,6 @@ libtalerauditor_la_LIBADD += -lgnurl
endif
endif
-
libtalertesting_la_LDFLAGS = \
-version-info 0:0:0 \
-no-undefined
@@ -135,96 +141,70 @@ libtalertesting_la_LIBADD = \
-ljansson \
$(XLIB)
-if HAVE_LIBCURL
-libtalerexchange_la_LIBADD += -lcurl
-else
-if HAVE_LIBGNURL
-libtalerexchange_la_LIBADD += -lgnurl
-endif
-endif
+# Testcases
+
+AM_TESTS_ENVIRONMENT=export TALER_PREFIX=$${TALER_PREFIX:-@libdir@};export PATH=$${TALER_PREFIX:-@prefix@}/bin:$$PATH;
check_PROGRAMS = \
- test_auditor_api_version \
test_auditor_api \
+ test_auditor_api_version \
test_bank_api_with_fakebank \
test_bank_api_with_pybank \
test_exchange_api \
test_exchange_api_keys_cherry_picking \
- test_exchange_api_overlapping_keys_bug
-
+ test_exchange_api_overlapping_keys_bug \
+ test_taler_exchange_aggregator-postgres \
+ test_taler_exchange_wirewatch-postgres
if HAVE_TWISTER
check_PROGRAMS += \
test_exchange_api_twisted \
- test_bank_api_with_pybank_twisted \
- test_bank_api_with_fakebank_twisted
+ test_bank_api_with_fakebank_twisted \
+ test_bank_api_with_pybank_twisted
endif
-test_bank_api_with_pybank_SOURCES = \
- test_bank_api.c
-test_bank_api_with_pybank_LDADD = \
- libtalertesting.la \
- libtalerexchange.la \
- -lgnunetutil \
- $(top_builddir)/src/bank-lib/libtalerbank.la
-
-test_bank_api_with_fakebank_SOURCES = \
- test_bank_api.c
-test_bank_api_with_fakebank_LDADD = \
- $(top_builddir)/src/lib/libtalertesting.la \
- -ltalerexchange \
- -lgnunetutil \
- libtalerbank.la
+TESTS = \
+ $(check_PROGRAMS)
-test_exchange_api_twisted_SOURCES = \
- test_exchange_api_twisted.c
-test_exchange_api_twisted_LDADD = \
- $(LIBGCRYPT_LIBS) \
+test_auditor_api_SOURCES = \
+ test_auditor_api.c
+test_auditor_api_LDADD = \
+ libtalerauditor.la \
libtalertesting.la \
libtalerexchange.la \
+ $(LIBGCRYPT_LIBS) \
$(top_builddir)/src/bank-lib/libtalerfakebank.la \
$(top_builddir)/src/bank-lib/libtalerbank.la \
$(top_builddir)/src/json/libtalerjson.la \
$(top_builddir)/src/util/libtalerutil.la \
- -ltalertwistertesting \
- -lgnunetjson \
-lgnunetcurl \
-lgnunetutil \
-ljansson
-test_bank_api_with_fakebank_twisted_SOURCES = \
- test_bank_api_twisted.c
-test_bank_api_with_fakebank_twisted_LDADD = \
- $(top_builddir)/src/lib/libtalertesting.la \
- $(top_builddir)/src/bank-lib/libtalerbank.la \
- $(top_builddir)/src/bank-lib/libtalerfakebank.la \
- $(top_builddir)/src/lib/libtalerexchange.la \
- $(top_builddir)/src/json/libtalerjson.la \
- -ltalertwistertesting \
- -lgnunetjson \
+test_auditor_api_version_SOURCES = \
+ test_auditor_api_version.c
+test_auditor_api_version_LDADD = \
+ libtalerauditor.la \
+ $(LIBGCRYPT_LIBS) \
+ $(top_builddir)/src/util/libtalerutil.la \
-lgnunetcurl \
-lgnunetutil \
-ljansson
-test_bank_api_with_pybank_twisted_SOURCES = \
- test_bank_api_twisted.c
-test_bank_api_with_pybank_twisted_LDADD = \
+test_bank_api_with_fakebank_SOURCES = \
+ test_bank_api.c
+test_bank_api_with_fakebank_LDADD = \
$(top_builddir)/src/lib/libtalertesting.la \
- $(top_builddir)/src/bank-lib/libtalerbank.la \
- $(top_builddir)/src/bank-lib/libtalerfakebank.la \
- $(top_builddir)/src/lib/libtalerexchange.la \
- $(top_builddir)/src/json/libtalerjson.la \
- -ltalertwistertesting \
- -lgnunetjson \
- -lgnunetcurl \
+ -ltalerexchange \
-lgnunetutil \
- -ljansson
-
-
-
-AM_TESTS_ENVIRONMENT=export TALER_PREFIX=$${TALER_PREFIX:-@libdir@};export PATH=$${TALER_PREFIX:-@prefix@}/bin:$$PATH;
+ libtalerbank.la
-TESTS = \
- $(check_PROGRAMS)
+test_bank_api_with_pybank_SOURCES = \
+ test_bank_api.c
+test_bank_api_with_pybank_LDADD = \
+ libtalertesting.la \
+ libtalerexchange.la \
+ -lgnunetutil \
+ $(top_builddir)/src/bank-lib/libtalerbank.la
test_exchange_api_SOURCES = \
test_exchange_api.c
@@ -240,9 +220,9 @@ test_exchange_api_LDADD = \
-lgnunetutil \
-ljansson
-test_exchange_api_overlapping_keys_bug_SOURCES = \
- test_exchange_api_overlapping_keys_bug.c
-test_exchange_api_overlapping_keys_bug_LDADD = \
+test_exchange_api_keys_cherry_picking_SOURCES = \
+ test_exchange_api_keys_cherry_picking.c
+test_exchange_api_keys_cherry_picking_LDADD = \
libtalertesting.la \
libtalerexchange.la \
$(LIBGCRYPT_LIBS) \
@@ -253,9 +233,9 @@ test_exchange_api_overlapping_keys_bug_LDADD = \
-lgnunetutil \
-ljansson
-test_exchange_api_keys_cherry_picking_SOURCES = \
- test_exchange_api_keys_cherry_picking.c
-test_exchange_api_keys_cherry_picking_LDADD = \
+test_exchange_api_overlapping_keys_bug_SOURCES = \
+ test_exchange_api_overlapping_keys_bug.c
+test_exchange_api_overlapping_keys_bug_LDADD = \
libtalertesting.la \
libtalerexchange.la \
$(LIBGCRYPT_LIBS) \
@@ -266,37 +246,87 @@ test_exchange_api_keys_cherry_picking_LDADD = \
-lgnunetutil \
-ljansson
-test_auditor_api_SOURCES = \
- test_auditor_api.c
-test_auditor_api_LDADD = \
- libtalerauditor.la \
+test_taler_exchange_aggregator_postgres_SOURCES = \
+ test_taler_exchange_aggregator.c
+test_taler_exchange_aggregator_postgres_LDADD = \
+ $(LIBGCRYPT_LIBS) \
+ $(top_builddir)/src/exchangedb/libtalerexchangedb.la \
+ $(top_builddir)/src/bank-lib/libtalerfakebank.la \
+ $(top_builddir)/src/json/libtalerjson.la \
+ $(top_builddir)/src/util/libtalerutil.la \
+ -lmicrohttpd \
+ -lgnunetutil \
+ -lgnunetjson \
+ -ljansson \
+ -lpthread
+
+test_taler_exchange_wirewatch_postgres_SOURCES = \
+ test_taler_exchange_wirewatch.c
+test_taler_exchange_wirewatch_postgres_LDADD = \
+ $(LIBGCRYPT_LIBS) \
+ $(top_builddir)/src/exchangedb/libtalerexchangedb.la \
+ $(top_builddir)/src/bank-lib/libtalerfakebank.la \
+ $(top_builddir)/src/json/libtalerjson.la \
+ $(top_builddir)/src/util/libtalerutil.la \
+ -lmicrohttpd \
+ -lgnunetutil \
+ -lgnunetjson \
+ -lgnunetpq \
+ -ljansson \
+ -lpthread
+
+test_exchange_api_twisted_SOURCES = \
+ test_exchange_api_twisted.c
+test_exchange_api_twisted_LDADD = \
+ $(LIBGCRYPT_LIBS) \
libtalertesting.la \
libtalerexchange.la \
- $(LIBGCRYPT_LIBS) \
$(top_builddir)/src/bank-lib/libtalerfakebank.la \
$(top_builddir)/src/bank-lib/libtalerbank.la \
$(top_builddir)/src/json/libtalerjson.la \
$(top_builddir)/src/util/libtalerutil.la \
+ -ltalertwistertesting \
+ -lgnunetjson \
-lgnunetcurl \
-lgnunetutil \
-ljansson
+test_bank_api_with_fakebank_twisted_SOURCES = \
+ test_bank_api_twisted.c
+test_bank_api_with_fakebank_twisted_LDADD = \
+ $(top_builddir)/src/lib/libtalertesting.la \
+ $(top_builddir)/src/bank-lib/libtalerbank.la \
+ $(top_builddir)/src/bank-lib/libtalerfakebank.la \
+ $(top_builddir)/src/lib/libtalerexchange.la \
+ $(top_builddir)/src/json/libtalerjson.la \
+ -ltalertwistertesting \
+ -lgnunetjson \
+ -lgnunetcurl \
+ -lgnunetutil \
+ -ljansson
-test_auditor_api_version_SOURCES = \
- test_auditor_api_version.c
-test_auditor_api_version_LDADD = \
- libtalerauditor.la \
- $(LIBGCRYPT_LIBS) \
- $(top_builddir)/src/util/libtalerutil.la \
+test_bank_api_with_pybank_twisted_SOURCES = \
+ test_bank_api_twisted.c
+test_bank_api_with_pybank_twisted_LDADD = \
+ $(top_builddir)/src/lib/libtalertesting.la \
+ $(top_builddir)/src/bank-lib/libtalerbank.la \
+ $(top_builddir)/src/bank-lib/libtalerfakebank.la \
+ $(top_builddir)/src/lib/libtalerexchange.la \
+ $(top_builddir)/src/json/libtalerjson.la \
+ -ltalertwistertesting \
+ -lgnunetjson \
-lgnunetcurl \
-lgnunetutil \
-ljansson
+# Distribution
EXTRA_DIST = \
bank.conf \
bank_twisted.conf \
+ test_auditor_api.conf \
+ test_auditor_api_expire_reserve_now.conf \
test_exchange_api_home/.local/share/taler/exchange/offline-keys/master.priv \
test_exchange_api_home/.config/taler/account-2.json \
test_exchange_api_keys_cherry_picking_home/.config/taler/x-taler-bank.json \
@@ -310,5 +340,5 @@ EXTRA_DIST = \
test_exchange_api_keys_cherry_picking_extended.conf \
test_exchange_api_keys_cherry_picking_extended_2.conf \
test_exchange_api_expire_reserve_now.conf \
- test_auditor_api.conf \
- test_auditor_api_expire_reserve_now.conf
+ test-taler-exchange-aggregator-postgres.conf \
+ test-taler-exchange-wirewatch-postgres.conf
diff --git a/src/exchange/test-taler-exchange-aggregator-postgres.conf b/src/lib/test-taler-exchange-aggregator-postgres.conf
index b6c18fd5b..b6c18fd5b 100644
--- a/src/exchange/test-taler-exchange-aggregator-postgres.conf
+++ b/src/lib/test-taler-exchange-aggregator-postgres.conf
diff --git a/src/exchange/test-taler-exchange-wirewatch-postgres.conf b/src/lib/test-taler-exchange-wirewatch-postgres.conf
index 7f8cc4793..7f8cc4793 100644
--- a/src/exchange/test-taler-exchange-wirewatch-postgres.conf
+++ b/src/lib/test-taler-exchange-wirewatch-postgres.conf
diff --git a/src/exchange/test_taler_exchange_aggregator.c b/src/lib/test_taler_exchange_aggregator.c
index a5f03e1d9..a5f03e1d9 100644
--- a/src/exchange/test_taler_exchange_aggregator.c
+++ b/src/lib/test_taler_exchange_aggregator.c
diff --git a/src/exchange/test_taler_exchange_wirewatch.c b/src/lib/test_taler_exchange_wirewatch.c
index 9c089a54d..9c089a54d 100644
--- a/src/exchange/test_taler_exchange_wirewatch.c
+++ b/src/lib/test_taler_exchange_wirewatch.c