gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] 02/02: restructure tests and build system


From: gnunet
Subject: [taler-exchange] 02/02: restructure tests and build system
Date: Sun, 12 Jan 2020 20:51:46 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

commit ca55b5078f1b8331bbe571209beff24c914b6b33
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Jan 12 20:51:42 2020 +0100

    restructure tests and build system
---
 src/exchange/Makefile.am                           |  49 +-----
 src/lib/Makefile.am                                | 194 ++++++++++++---------
 .../test-taler-exchange-aggregator-postgres.conf   |   0
 .../test-taler-exchange-wirewatch-postgres.conf    |   0
 .../test_taler_exchange_aggregator.c               |   0
 .../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 b08c85c6..92bbb90d 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 231e049a..8ffee92b 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
similarity index 100%
rename from src/exchange/test-taler-exchange-aggregator-postgres.conf
rename to 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
similarity index 100%
rename from src/exchange/test-taler-exchange-wirewatch-postgres.conf
rename to 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
similarity index 100%
rename from src/exchange/test_taler_exchange_aggregator.c
rename to 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
similarity index 100%
rename from src/exchange/test_taler_exchange_wirewatch.c
rename to src/lib/test_taler_exchange_wirewatch.c

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]