aboutsummaryrefslogtreecommitdiff
path: root/src/datacache
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-08-26 13:31:58 +0000
committerChristian Grothoff <christian@grothoff.org>2010-08-26 13:31:58 +0000
commitdeed215d0d135d30beac950a5f88050497ef9e39 (patch)
tree758c81e3bfe9c942e5d008fb81c50b36cbd161fa /src/datacache
parent53b47cfa3a1423700f1401385ca83051f91e0a53 (diff)
downloadgnunet-deed215d0d135d30beac950a5f88050497ef9e39.tar.gz
gnunet-deed215d0d135d30beac950a5f88050497ef9e39.zip
towards datacache
Diffstat (limited to 'src/datacache')
-rw-r--r--src/datacache/Makefile.am47
-rw-r--r--src/datacache/perf_datacache_data_postgres.conf7
-rw-r--r--src/datacache/test_datacache_data_postgres.conf7
3 files changed, 59 insertions, 2 deletions
diff --git a/src/datacache/Makefile.am b/src/datacache/Makefile.am
index 0598c2673..ea60d3500 100644
--- a/src/datacache/Makefile.am
+++ b/src/datacache/Makefile.am
@@ -17,6 +17,9 @@ endif
17if HAVE_MYSQL 17if HAVE_MYSQL
18 MYSQL_PLUGIN = libgnunet_plugin_datacache_mysql.la 18 MYSQL_PLUGIN = libgnunet_plugin_datacache_mysql.la
19endif 19endif
20if HAVE_POSTGRES
21 POSTGRES_PLUGIN = libgnunet_plugin_datacache_postgres.la
22endif
20 23
21lib_LTLIBRARIES = \ 24lib_LTLIBRARIES = \
22 libgnunetdatacache.la 25 libgnunetdatacache.la
@@ -35,6 +38,7 @@ libgnunetdatacache_la_LDFLAGS = \
35plugin_LTLIBRARIES = \ 38plugin_LTLIBRARIES = \
36 $(SQLITE_PLUGIN) \ 39 $(SQLITE_PLUGIN) \
37 $(MYSQL_PLUGIN) \ 40 $(MYSQL_PLUGIN) \
41 $(POSTGRES_PLUGIN) \
38 libgnunet_plugin_datacache_template.la 42 libgnunet_plugin_datacache_template.la
39 43
40 44
@@ -57,6 +61,17 @@ libgnunet_plugin_datacache_mysql_la_CPPFLAGS = \
57libgnunet_plugin_datacache_mysql_la_LDFLAGS = \ 61libgnunet_plugin_datacache_mysql_la_LDFLAGS = \
58 $(GN_PLUGIN_LDFLAGS) $(MYSQL_LDFLAGS) -lmysqlclient 62 $(GN_PLUGIN_LDFLAGS) $(MYSQL_LDFLAGS) -lmysqlclient
59 63
64libgnunet_plugin_datacache_postgres_la_SOURCES = \
65 plugin_datacache_postgres.c
66libgnunet_plugin_datacache_postgres_la_LIBADD = \
67 $(top_builddir)/src/statistics/libgnunetstatistics.la \
68 $(top_builddir)/src/util/libgnunetutil.la \
69 $(GN_PLUGIN_LDFLAGS) $(POSTGRES_LDFLAGS) -lpq
70libgnunet_plugin_datacache_postgres_la_CPPFLAGS = \
71 $(POSTGRES_CPPFLAGS)
72libgnunet_plugin_datacache_postgres_la_LDFLAGS = \
73 $(GN_PLUGIN_LDFLAGS) $(POSTGRES_LDFLAGS) -lpq
74
60libgnunet_plugin_datacache_template_la_SOURCES = \ 75libgnunet_plugin_datacache_template_la_SOURCES = \
61 plugin_datacache_template.c 76 plugin_datacache_template.c
62libgnunet_plugin_datacache_template_la_LIBADD = \ 77libgnunet_plugin_datacache_template_la_LIBADD = \
@@ -79,9 +94,17 @@ MYSQL_TESTS = \
79 perf_datacache_mysql 94 perf_datacache_mysql
80endif 95endif
81 96
97if HAVE_POSTGRES
98POSTGRES_TESTS = \
99 test_datacache_postgres \
100 test_datacache_quota_postgres \
101 perf_datacache_postgres
102endif
103
82check_PROGRAMS = \ 104check_PROGRAMS = \
83 $(SQLITE_TESTS) \ 105 $(SQLITE_TESTS) \
84 $(MYSQL_TESTS) 106 $(MYSQL_TESTS) \
107 $(POSTGRES_TESTS)
85 108
86if !DISABLE_TEST_RUN 109if !DISABLE_TEST_RUN
87TESTS = $(check_PROGRAMS) 110TESTS = $(check_PROGRAMS)
@@ -123,8 +146,28 @@ perf_datacache_mysql_LDADD = \
123 $(top_builddir)/src/datacache/libgnunetdatacache.la \ 146 $(top_builddir)/src/datacache/libgnunetdatacache.la \
124 $(top_builddir)/src/util/libgnunetutil.la 147 $(top_builddir)/src/util/libgnunetutil.la
125 148
149test_datacache_postgres_SOURCES = \
150 test_datacache.c
151test_datacache_postgres_LDADD = \
152 $(top_builddir)/src/datacache/libgnunetdatacache.la \
153 $(top_builddir)/src/util/libgnunetutil.la
154
155test_datacache_quota_postgres_SOURCES = \
156 test_datacache_quota.c
157test_datacache_quota_postgres_LDADD = \
158 $(top_builddir)/src/datacache/libgnunetdatacache.la \
159 $(top_builddir)/src/util/libgnunetutil.la
160
161perf_datacache_postgres_SOURCES = \
162 perf_datacache.c
163perf_datacache_postgres_LDADD = \
164 $(top_builddir)/src/datacache/libgnunetdatacache.la \
165 $(top_builddir)/src/util/libgnunetutil.la
166
126EXTRA_DIST = \ 167EXTRA_DIST = \
127 test_datacache_data_sqlite.conf \ 168 test_datacache_data_sqlite.conf \
128 perf_datacache_data_sqlite.conf \ 169 perf_datacache_data_sqlite.conf \
129 test_datacache_data_mysql.conf \ 170 test_datacache_data_mysql.conf \
130 perf_datacache_data_mysql.conf 171 perf_datacache_data_mysql.conf \
172 test_datacache_data_postgres.conf \
173 perf_datacache_data_postgres.conf
diff --git a/src/datacache/perf_datacache_data_postgres.conf b/src/datacache/perf_datacache_data_postgres.conf
new file mode 100644
index 000000000..931c44f1b
--- /dev/null
+++ b/src/datacache/perf_datacache_data_postgres.conf
@@ -0,0 +1,7 @@
1
2[perfcache]
3QUOTA = 500000
4DATABASE = mysql
5
6[datacache-mysql]
7CONFIG = dbname=gnunetcheck
diff --git a/src/datacache/test_datacache_data_postgres.conf b/src/datacache/test_datacache_data_postgres.conf
new file mode 100644
index 000000000..51d2dae64
--- /dev/null
+++ b/src/datacache/test_datacache_data_postgres.conf
@@ -0,0 +1,7 @@
1
2[testcache]
3QUOTA = 1000000
4DATABASE = postgrers
5
6[datacache-postgres]
7CONFIG = dbname=gnunetcheck