commit 423e85135d963dc85240b83bf963d320745f979b
parent a953722238bb97470deb674355e73fe629a772af
Author: Matyja Lukas Adam <lukas.matyja@students.bfh.ch>
Date: Tue, 9 Jan 2024 11:49:03 +0100
[lib][testing] makefile changes
Diffstat:
5 files changed, 53 insertions(+), 37 deletions(-)
diff --git a/src/donau-tools/donau-dbinit.c b/src/donau-tools/donau-dbinit.c
@@ -83,15 +83,15 @@ run (void *cls,
global_ret = EXIT_NOTINSTALLED;
return;
}
- if (reset_db)
- {
- if (GNUNET_OK !=
- plugin->drop_tables (plugin->cls))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Could not drop tables as requested. Either database was not yet initialized, or permission denied. Consult the logs. Will still try to create new tables.\n");
- }
- }
+ // if (reset_db)
+ // {
+ // if (GNUNET_OK !=
+ // plugin->drop_tables (plugin->cls))
+ // {
+ // GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ // "Could not drop tables as requested. Either database was not yet initialized, or permission denied. Consult the logs. Will still try to create new tables.\n");
+ // }
+ // }
if (GNUNET_OK !=
plugin->create_tables (plugin->cls,
force_create_partitions || num_partitions > 0,
diff --git a/src/donaudb/donaudb-postgres.conf b/src/donaudb/donaudb-postgres.conf
@@ -1,5 +1,5 @@
[donaudb-postgres]
-CONFIG = "postgres:///taler"
+CONFIG = "postgres:///talercheck"
# Where are the SQL files to setup our tables?
# Important: this MUST end with a "/"!
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
@@ -13,14 +13,14 @@ endif
# Libraries
-#lib_LTLIBRARIES = \
-# libtalerdonau.la
+lib_LTLIBRARIES = \
+ libdonau.la
libdonau_la_LDFLAGS = \
-version-info 5:0:0 \
-no-undefined
-libtalerexchange_la_SOURCES = \
- exchange_api_handle.c exchange_api_handle.h
+libdonau_la_SOURCES = \
+ donau_api_handle.c donau_api_handle.h
## maybe need libtalercurl
libdonau_la_LIBADD = \
@@ -32,3 +32,11 @@ libdonau_la_LIBADD = \
-ljansson \
$(LIBGNURLCURL_LIBS) \
$(XLIB)
+
+.NOTPARALLEL:
+check_PROGRAMS = \
+ test_donau_api_cs \
+ test_donau_api_rsa
+
+TESTS = \
+ $(check_PROGRAMS)
diff --git a/src/lib/donau_api_handle.c b/src/lib/donau_api_handle.c
@@ -32,9 +32,9 @@
#include "taler/taler_signatures.h"
#include "donau_api_handle.h"
#include "donau_api_curl_defaults.h"
-#include "backoff.h"
+//#include "backoff.h"
#include "taler/taler_curl_lib.h"
-#include <gnunet/gnunet_crypto_lib.h>
+#include <gnunet/gnunet_util_lib.h>
/**
* Which version of the Donau protocol is implemented
@@ -980,4 +980,4 @@ DONAU_keys_to_json (const struct DONAU_Keys *kd)
}
-/* end of donau_api_handle.c */
-\ No newline at end of file
+/* end of donau_api_handle.c */
diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am
@@ -16,33 +16,36 @@ clean-local:
bin_SCRIPTS = \
donau-unified-setup.sh
-libtalertesting_la_LDFLAGS = \
+lib_LTLIBRARIES = \
+ libdonautesting.la
+
+libdonautesting_la_LDFLAGS = \
-version-info 0:0:0 \
-no-undefined
-libtalertesting_la_SOURCES = \
- testing_api_cmd_get_exchange.c
-
-test_exchange_api_cs_SOURCES = \
- test_exchange_api.c
-test_exchange_api_cs_LDADD = \
- libtalertesting.la \
- $(top_builddir)/src/lib/libtalerdonau.la \
+libdonautesting_la_SOURCES = \
+ testing_api_cmd_get_donau.c
+
+test_donau_api_cs_SOURCES = \
+ test_donau_api.c
+test_donau_api_cs_LDADD = \
+ libdonautesting.la \
+ $(top_builddir)/src/lib/libdonau.la \
$(LIBGCRYPT_LIBS) \
$(top_builddir)/src/json/libtalerjson.la \
- $(top_builddir)/src/util/libtalerutil.la \
+ $(top_builddir)/src/util/libdonauutil.la \
-lgnunetcurl \
-lgnunetutil \
-ljansson \
$(XLIB)
-test_exchange_api_rsa_SOURCES = \
- test_exchange_api.c
-test_exchange_api_rsa_LDADD = \
- libtalertesting.la \
- $(top_builddir)/src/lib/libtalerdonau.la \
+test_donau_api_rsa_SOURCES = \
+ test_donau_api.c
+test_donau_api_rsa_LDADD = \
+ libdonautesting.la \
+ $(top_builddir)/src/lib/libdonau.la \
$(LIBGCRYPT_LIBS) \
- $(top_builddir)/src/json/libtalerjson.la \
- $(top_builddir)/src/util/libtalerutil.la \
+ $(top_builddir)/src/json/libdonaujson.la \
+ $(top_builddir)/src/util/libdonauutil.la \
-lgnunetcurl \
-lgnunetutil \
-ljansson \
@@ -52,4 +55,10 @@ test_exchange_api_rsa_LDADD = \
$(bin_SCRIPTS) \
coins-cs.conf \
coins-rsa.conf \
- test_exchange_api.conf
-\ No newline at end of file
+ test_donau_api.conf
+
+libdonautesting_la_LDFLAGS = \
+ -version-info 0:0:0 \
+ -no-undefined
+libdonautesting_la_SOURCES = \
+ testing_api_cmd_get_donau.c
+\ No newline at end of file