summaryrefslogtreecommitdiff
path: root/tools/tests
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-04-02 20:40:53 +0200
committerStef Walter <stefw@gnome.org>2013-04-03 10:39:09 +0200
commitfcc3a83cc4d540bc2c4096524b5e8003046ba561 (patch)
tree5bc566d6813448f83269797ce05aadeb02cdf36f /tools/tests
parentae7dd1be6d431f25b101bc7e2b3fa373a8cbb47b (diff)
Separate library init from message code
Put library init/uninit code its into their own statically linked library so that they don't get linked into the p11-kit executable. Refactor the message code so that the library initialization can plug in its per thread message buffer. https://bugs.freedesktop.org/show_bug.cgi?id=63046
Diffstat (limited to 'tools/tests')
-rw-r--r--tools/tests/Makefile.am3
-rw-r--r--tools/tests/test-extract.c3
-rw-r--r--tools/tests/test-openssl.c3
-rw-r--r--tools/tests/test-pem.c3
-rw-r--r--tools/tests/test-save.c5
-rw-r--r--tools/tests/test-x509.c3
6 files changed, 8 insertions, 12 deletions
diff --git a/tools/tests/Makefile.am b/tools/tests/Makefile.am
index 7936743..f6609ec 100644
--- a/tools/tests/Makefile.am
+++ b/tools/tests/Makefile.am
@@ -24,8 +24,7 @@ LDADD = \
$(top_builddir)/p11-kit/libp11-kit.la \
$(top_builddir)/common/libp11-data.la \
$(top_builddir)/common/libp11-mock.la \
- $(top_builddir)/common/libp11-library.la \
- $(top_builddir)/common/libp11-compat.la \
+ $(top_builddir)/common/libp11-common.la \
$(builddir)/libtestcommon.la \
$(LIBTASN1_LIBS) \
$(LTLIBINTL) \
diff --git a/tools/tests/test-extract.c b/tools/tests/test-extract.c
index 29ee986..74e3c9c 100644
--- a/tools/tests/test-extract.c
+++ b/tools/tests/test-extract.c
@@ -40,7 +40,7 @@
#include "debug.h"
#include "dict.h"
#include "extract.h"
-#include "library.h"
+#include "message.h"
#include "mock.h"
#include "pkcs11.h"
#include "pkcs11x.h"
@@ -524,7 +524,6 @@ main (void)
int ret;
putenv ("P11_KIT_STRICT=1");
- p11_library_init ();
mock_module_init ();
p11_debug_init ();
diff --git a/tools/tests/test-openssl.c b/tools/tests/test-openssl.c
index 77df109..286b4e9 100644
--- a/tools/tests/test-openssl.c
+++ b/tools/tests/test-openssl.c
@@ -41,7 +41,7 @@
#include "debug.h"
#include "dict.h"
#include "extract.h"
-#include "library.h"
+#include "message.h"
#include "mock.h"
#include "pkcs11.h"
#include "pkcs11x.h"
@@ -655,7 +655,6 @@ main (void)
int ret;
putenv ("P11_KIT_STRICT=1");
- p11_library_init ();
mock_module_init ();
p11_debug_init ();
diff --git a/tools/tests/test-pem.c b/tools/tests/test-pem.c
index 5c19455..be79279 100644
--- a/tools/tests/test-pem.c
+++ b/tools/tests/test-pem.c
@@ -40,7 +40,7 @@
#include "debug.h"
#include "dict.h"
#include "extract.h"
-#include "library.h"
+#include "message.h"
#include "mock.h"
#include "pkcs11.h"
#include "pkcs11x.h"
@@ -249,7 +249,6 @@ main (void)
int ret;
putenv ("P11_KIT_STRICT=1");
- p11_library_init ();
mock_module_init ();
p11_debug_init ();
diff --git a/tools/tests/test-save.c b/tools/tests/test-save.c
index 32713ee..d686bd6 100644
--- a/tools/tests/test-save.c
+++ b/tools/tests/test-save.c
@@ -39,7 +39,7 @@
#include "compat.h"
#include "debug.h"
#include "dict.h"
-#include "library.h"
+#include "message.h"
#include "save.h"
#include "test.h"
@@ -537,7 +537,8 @@ main (void)
CuSuite* suite = CuSuiteNew ();
int ret;
- p11_library_init ();
+ putenv ("P11_KIT_STRICT=1");
+ p11_debug_init ();
SUITE_ADD_TEST (suite, test_file_write);
SUITE_ADD_TEST (suite, test_file_exists);
diff --git a/tools/tests/test-x509.c b/tools/tests/test-x509.c
index 7cf9787..138e6b7 100644
--- a/tools/tests/test-x509.c
+++ b/tools/tests/test-x509.c
@@ -40,7 +40,7 @@
#include "debug.h"
#include "dict.h"
#include "extract.h"
-#include "library.h"
+#include "message.h"
#include "mock.h"
#include "pkcs11.h"
#include "pkcs11x.h"
@@ -259,7 +259,6 @@ main (void)
int ret;
putenv ("P11_KIT_STRICT=1");
- p11_library_init ();
mock_module_init ();
p11_debug_init ();