diff options
author | Stef Walter <stef@thewalter.net> | 2014-08-15 08:41:43 +0200 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2014-08-15 10:43:04 +0200 |
commit | 677dee1a04058aefe8c7689f88da52afe3b4b4bb (patch) | |
tree | 570bf0fb53fa659954f03e146696969ab97abe3a /p11-kit | |
parent | 2a35a67923c26cd38839197aee51c274e5c2550e (diff) |
Move to non-recursive Makefile for building bins and libs
Still use recursive for documentation and translation.
Diffstat (limited to 'p11-kit')
-rw-r--r-- | p11-kit/Makefile.am | 244 | ||||
-rw-r--r-- | p11-kit/fixtures/package-modules/four.module (renamed from p11-kit/tests/files/package-modules/four.module) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/package-modules/win32/four.module (renamed from p11-kit/tests/files/package-modules/win32/four.module) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/system-modules/one.module (renamed from p11-kit/tests/files/system-modules/one.module) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/system-modules/two-duplicate.module (renamed from p11-kit/tests/files/system-modules/two-duplicate.module) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/system-modules/two.badname (renamed from p11-kit/tests/files/system-modules/two.badname) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/system-modules/win32/one.module (renamed from p11-kit/tests/files/system-modules/win32/one.module) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/system-modules/win32/two-duplicate.module (renamed from p11-kit/tests/files/system-modules/win32/two-duplicate.module) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/system-modules/win32/two.badname (renamed from p11-kit/tests/files/system-modules/win32/two.badname) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/system-pkcs11.conf (renamed from p11-kit/tests/files/system-pkcs11.conf) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/test-1.conf (renamed from p11-kit/tests/files/test-1.conf) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/test-pinfile (renamed from p11-kit/tests/files/test-pinfile) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/test-pinfile-large (renamed from p11-kit/tests/files/test-pinfile-large) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/test-system-invalid.conf (renamed from p11-kit/tests/files/test-system-invalid.conf) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/test-system-merge.conf (renamed from p11-kit/tests/files/test-system-merge.conf) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/test-system-none.conf (renamed from p11-kit/tests/files/test-system-none.conf) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/test-system-only.conf (renamed from p11-kit/tests/files/test-system-only.conf) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/test-user-invalid.conf (renamed from p11-kit/tests/files/test-user-invalid.conf) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/test-user-only.conf (renamed from p11-kit/tests/files/test-user-only.conf) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/test-user.conf (renamed from p11-kit/tests/files/test-user.conf) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/user-modules/one.module (renamed from p11-kit/tests/files/user-modules/one.module) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/user-modules/three.module (renamed from p11-kit/tests/files/user-modules/three.module) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/user-modules/win32/one.module (renamed from p11-kit/tests/files/user-modules/win32/one.module) | 0 | ||||
-rw-r--r-- | p11-kit/fixtures/user-modules/win32/three.module (renamed from p11-kit/tests/files/user-modules/win32/three.module) | 0 | ||||
-rw-r--r-- | p11-kit/frob-setuid.c (renamed from p11-kit/tests/frob-setuid.c) | 0 | ||||
-rw-r--r-- | p11-kit/mock-module-ep.c (renamed from p11-kit/tests/mock-module-ep.c) | 0 | ||||
-rw-r--r-- | p11-kit/mock-module-ep2.c (renamed from p11-kit/tests/mock-module-ep2.c) | 0 | ||||
-rw-r--r-- | p11-kit/print-messages.c (renamed from p11-kit/tests/print-messages.c) | 0 | ||||
-rw-r--r-- | p11-kit/test-conf.c (renamed from p11-kit/tests/test-conf.c) | 54 | ||||
-rw-r--r-- | p11-kit/test-deprecated.c (renamed from p11-kit/tests/test-deprecated.c) | 0 | ||||
-rw-r--r-- | p11-kit/test-init.c (renamed from p11-kit/tests/test-init.c) | 0 | ||||
-rw-r--r-- | p11-kit/test-iter.c (renamed from p11-kit/tests/test-iter.c) | 0 | ||||
-rw-r--r-- | p11-kit/test-log.c (renamed from p11-kit/tests/test-log.c) | 0 | ||||
-rw-r--r-- | p11-kit/test-managed.c (renamed from p11-kit/tests/test-managed.c) | 0 | ||||
-rw-r--r-- | p11-kit/test-mock.c (renamed from p11-kit/tests/test-mock.c) | 0 | ||||
-rw-r--r-- | p11-kit/test-modules.c (renamed from p11-kit/tests/test-modules.c) | 0 | ||||
-rw-r--r-- | p11-kit/test-pin.c (renamed from p11-kit/tests/test-pin.c) | 6 | ||||
-rw-r--r-- | p11-kit/test-progname.c (renamed from p11-kit/tests/test-progname.c) | 0 | ||||
-rw-r--r-- | p11-kit/test-proxy.c (renamed from p11-kit/tests/test-proxy.c) | 0 | ||||
-rw-r--r-- | p11-kit/test-rpc.c (renamed from p11-kit/tests/test-rpc.c) | 0 | ||||
-rw-r--r-- | p11-kit/test-transport.c (renamed from p11-kit/tests/test-transport.c) | 2 | ||||
-rw-r--r-- | p11-kit/test-uri.c (renamed from p11-kit/tests/test-uri.c) | 0 | ||||
-rw-r--r-- | p11-kit/test-util.c (renamed from p11-kit/tests/test-util.c) | 0 | ||||
-rw-r--r-- | p11-kit/test-virtual.c (renamed from p11-kit/tests/test-virtual.c) | 0 | ||||
-rw-r--r-- | p11-kit/tests/Makefile.am | 91 |
45 files changed, 201 insertions, 196 deletions
diff --git a/p11-kit/Makefile.am b/p11-kit/Makefile.am index dd2716d..b4b4886 100644 --- a/p11-kit/Makefile.am +++ b/p11-kit/Makefile.am @@ -1,51 +1,34 @@ -include $(top_srcdir)/build/Makefile.decl - -SUBDIRS = . tests - -COMMON = $(top_srcdir)/common - -AM_CPPFLAGS = \ - -I$(top_srcdir) \ - -I$(COMMON) \ - -DSRCDIR=\"$(srcdir)\" \ - -DBINDIR=\"$(bindir)\" \ - -DPRIVATEDIR=\"$(privatedir)\" \ - -DP11_KIT_FUTURE_UNSTABLE_API \ - $(NULL) - -incdir = $(includedir)/p11-kit-1/p11-kit - -inc_HEADERS = \ - deprecated.h \ - iter.h \ - p11-kit.h \ - pin.h \ - remote.h \ - uri.h \ +inc_HEADERS += \ + p11-kit/deprecated.h \ + p11-kit/iter.h \ + p11-kit/p11-kit.h \ + p11-kit/pin.h \ + p11-kit/remote.h \ + p11-kit/uri.h \ $(NULL) MODULE_SRCS = \ - util.c \ - conf.c conf.h \ - iter.c \ - log.c log.h \ - modules.c modules.h \ - pkcs11.h \ - pin.c \ - pkcs11.h \ - proxy.c proxy.h \ - private.h \ - messages.c \ - remote.c \ - rpc-transport.c rpc.h \ - rpc-message.c rpc-message.h \ - rpc-client.c rpc-server.c \ - uri.c \ - virtual.c virtual.h \ + p11-kit/util.c \ + p11-kit/conf.c p11-kit/conf.h \ + p11-kit/iter.c \ + p11-kit/log.c p11-kit/log.h \ + p11-kit/modules.c p11-kit/modules.h \ + p11-kit/pkcs11.h \ + p11-kit/pin.c \ + p11-kit/pkcs11.h \ + p11-kit/private.h \ + p11-kit/proxy.c p11-kit/proxy.h \ + p11-kit/messages.c \ + p11-kit/remote.c \ + p11-kit/rpc-transport.c p11-kit/rpc.h \ + p11-kit/rpc-message.c p11-kit/rpc-message.h \ + p11-kit/rpc-client.c p11-kit/rpc-server.c \ + p11-kit/uri.c \ + p11-kit/virtual.c p11-kit/virtual.h \ $(inc_HEADERS) -lib_LTLIBRARIES = \ +lib_LTLIBRARIES += \ libp11-kit.la libp11_kit_la_CFLAGS = \ @@ -66,13 +49,13 @@ libp11_kit_la_LDFLAGS = \ libp11_kit_la_SOURCES = $(MODULE_SRCS) libp11_kit_la_LIBADD = \ - $(top_builddir)/common/libp11-common.la \ - $(top_builddir)/common/libp11-library.la \ + libp11-common.la \ + libp11-library.la \ $(LIBFFI_LIBS) \ $(LTLIBINTL) \ $(NULL) -noinst_LTLIBRARIES = \ +noinst_LTLIBRARIES += \ libp11-kit-testable.la libp11_kit_testable_la_LDFLAGS = -no-undefined @@ -82,24 +65,24 @@ libp11_kit_testable_la_LIBADD = $(libp11_kit_la_LIBADD) if OS_WIN32 libp11_kit_testable_la_CFLAGS = \ - -DP11_SYSTEM_CONFIG_FILE=\""$(abs_top_srcdir)/p11-kit/tests/files/system-pkcs11.conf"\" \ - -DP11_SYSTEM_CONFIG_MODULES=\""$(abs_top_srcdir)/p11-kit/tests/files/system-modules/win32"\" \ - -DP11_PACKAGE_CONFIG_MODULES=\""$(abs_top_srcdir)/p11-kit/tests/files/package-modules/win32"\" \ - -DP11_USER_CONFIG_FILE=\""$(abs_top_srcdir)/p11-kit/tests/files/user-pkcs11.conf"\" \ - -DP11_USER_CONFIG_MODULES=\""$(abs_top_srcdir)/p11-kit/tests/files/user-modules/win32"\" \ - -DP11_MODULE_PATH=\""$(abs_top_builddir)/p11-kit/tests/.libs"\" \ + -DP11_SYSTEM_CONFIG_FILE=\""$(abs_top_srcdir)/p11-kit/fixtures/system-pkcs11.conf"\" \ + -DP11_SYSTEM_CONFIG_MODULES=\""$(abs_top_srcdir)/p11-kit/fixtures/system-modules/win32"\" \ + -DP11_PACKAGE_CONFIG_MODULES=\""$(abs_top_srcdir)/p11-kit/fixtures/package-modules/win32"\" \ + -DP11_USER_CONFIG_FILE=\""$(abs_top_srcdir)/p11-kit/fixtures/user-pkcs11.conf"\" \ + -DP11_USER_CONFIG_MODULES=\""$(abs_top_srcdir)/p11-kit/fixtures/user-modules/win32"\" \ + -DP11_MODULE_PATH=\""$(abs_top_builddir)/.libs"\" \ $(LIBFFI_CFLAGS) \ $(NULL) else libp11_kit_testable_la_CFLAGS = \ - -DP11_SYSTEM_CONFIG_FILE=\""$(abs_top_srcdir)/p11-kit/tests/files/system-pkcs11.conf"\" \ - -DP11_SYSTEM_CONFIG_MODULES=\""$(abs_top_srcdir)/p11-kit/tests/files/system-modules"\" \ - -DP11_PACKAGE_CONFIG_MODULES=\""$(abs_top_srcdir)/p11-kit/tests/files/package-modules"\" \ - -DP11_USER_CONFIG_FILE=\""$(abs_top_srcdir)/p11-kit/tests/files/user-pkcs11.conf"\" \ - -DP11_USER_CONFIG_MODULES=\""$(abs_top_srcdir)/p11-kit/tests/files/user-modules"\" \ - -DP11_MODULE_PATH=\""$(abs_top_builddir)/p11-kit/tests/.libs"\" \ + -DP11_SYSTEM_CONFIG_FILE=\""$(abs_top_srcdir)/p11-kit/fixtures/system-pkcs11.conf"\" \ + -DP11_SYSTEM_CONFIG_MODULES=\""$(abs_top_srcdir)/p11-kit/fixtures/system-modules"\" \ + -DP11_PACKAGE_CONFIG_MODULES=\""$(abs_top_srcdir)/p11-kit/fixtures/package-modules"\" \ + -DP11_USER_CONFIG_FILE=\""$(abs_top_srcdir)/p11-kit/fixtures/user-pkcs11.conf"\" \ + -DP11_USER_CONFIG_MODULES=\""$(abs_top_srcdir)/p11-kit/fixtures/user-modules"\" \ + -DP11_MODULE_PATH=\""$(abs_top_builddir)/.libs"\" \ $(LIBFFI_CFLAGS) \ $(NULL) @@ -111,31 +94,144 @@ install-exec-hook: endif pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = p11-kit-1.pc +pkgconfig_DATA = p11-kit/p11-kit-1.pc exampledir = $(p11_system_config) -example_DATA = pkcs11.conf.example +example_DATA = p11-kit/pkcs11.conf.example -EXTRA_DIST = \ - p11-kit-1.pc.in \ - pkcs11.conf.example.in \ - docs.h \ +EXTRA_DIST += \ + p11-kit/p11-kit-1.pc.in \ + p11-kit/pkcs11.conf.example.in \ + p11-kit/docs.h \ $(NULL) -bin_PROGRAMS = \ - p11-kit - -p11_kit_SOURCES = \ - lists.c \ - p11-kit.c \ - $(NULL) +bin_PROGRAMS += p11-kit/p11-kit -p11_kit_CFLAGS = \ +p11_kit_p11_kit_SOURCES = \ + p11-kit/lists.c \ + p11-kit/p11-kit.c \ $(NULL) -p11_kit_LDADD = \ +p11_kit_p11_kit_LDADD = \ libp11-kit.la \ - $(top_builddir)/common/libp11-tool.la \ - $(top_builddir)/common/libp11-common.la \ + libp11-tool.la \ + libp11-common.la \ $(LTLIBINTL) \ $(NULL) + +# Tests ---------------------------------------------------------------- + +p11_kit_LIBS = \ + libp11-kit-testable.la \ + libp11-test.la \ + libp11-common.la \ + $(LTLIBINTL) + +CHECK_PROGS += \ + test-progname \ + test-util \ + test-conf \ + test-uri \ + test-pin \ + test-init \ + test-modules \ + test-deprecated \ + test-proxy \ + test-iter \ + test-rpc \ + $(NULL) + +test_conf_SOURCES = p11-kit/test-conf.c +test_conf_LDADD = $(p11_kit_LIBS) + +test_deprecated_SOURCES = p11-kit/test-deprecated.c +test_deprecated_LDADD = $(p11_kit_LIBS) + +test_init_SOURCES = p11-kit/test-init.c +test_init_LDADD = $(p11_kit_LIBS) + +test_iter_SOURCES = p11-kit/test-iter.c +test_iter_LDADD = $(p11_kit_LIBS) + +test_modules_SOURCES = p11-kit/test-modules.c +test_modules_LDADD = $(p11_kit_LIBS) + +test_pin_SOURCES = p11-kit/test-pin.c +test_pin_LDADD = $(p11_kit_LIBS) + +test_progname_SOURCES = p11-kit/test-progname.c +test_progname_LDADD = $(p11_kit_LIBS) + +test_proxy_SOURCES = p11-kit/test-proxy.c +test_proxy_LDADD = $(p11_kit_LIBS) + +test_rpc_SOURCES = p11-kit/test-rpc.c +test_rpc_LDADD = $(p11_kit_LIBS) + +test_uri_SOURCES = p11-kit/test-uri.c +test_uri_LDADD = $(p11_kit_LIBS) + +test_util_SOURCES = p11-kit/test-util.c +test_util_LDADD = $(p11_kit_LIBS) + +noinst_PROGRAMS += \ + print-messages \ + frob-setuid + +print_messages_SOURCES = p11-kit/print-messages.c +print_messages_LDADD = $(p11_kit_LIBS) + +frob_setuid_SOURCES = p11-kit/frob-setuid.c +frob_setuid_LDADD = $(p11_kit_LIBS) + +if WITH_FFI + +CHECK_PROGS += \ + test-virtual \ + test-managed \ + test-log \ + test-transport \ + $(NULL) + +test_log_SOURCES = p11-kit/test-log.c +test_log_LDADD = $(p11_kit_LIBS) + +test_managed_SOURCES = p11-kit/test-managed.c +test_managed_LDADD = $(p11_kit_LIBS) + +test_transport_SOURCES = p11-kit/test-transport.c +test_transport_LDADD = $(p11_kit_LIBS) + +test_virtual_SOURCES = p11-kit/test-virtual.c +test_virtual_LDADD = $(p11_kit_LIBS) + +endif + +noinst_LTLIBRARIES += \ + mock-one.la \ + mock-two.la \ + mock-three.la \ + mock-four.la + +mock_one_la_SOURCES = p11-kit/mock-module-ep.c +mock_one_la_LIBADD = libp11-test.la libp11-common.la +mock_one_la_LDFLAGS = \ + -module -avoid-version -rpath /nowhere \ + -no-undefined -export-symbols-regex 'C_GetFunctionList' + +mock_two_la_SOURCES = p11-kit/mock-module-ep2.c +mock_two_la_LDFLAGS = $(mock_one_la_LDFLAGS) +mock_two_la_LIBADD = $(mock_one_la_LIBADD) + +mock_three_la_SOURCES = $(mock_one_la_SOURCES) +mock_three_la_LDFLAGS = $(mock_one_la_LDFLAGS) +mock_three_la_LIBADD = $(mock_one_la_LIBADD) + +mock_four_la_SOURCES = $(mock_one_la_SOURCES) +mock_four_la_LDFLAGS = $(mock_one_la_LDFLAGS) +mock_four_la_LIBADD = $(mock_one_la_LIBADD) + +EXTRA_DIST += \ + p11-kit/fixtures \ + p11-kit/test-mock.c \ + $(NULL) diff --git a/p11-kit/tests/files/package-modules/four.module b/p11-kit/fixtures/package-modules/four.module index 933af2b..933af2b 100644 --- a/p11-kit/tests/files/package-modules/four.module +++ b/p11-kit/fixtures/package-modules/four.module diff --git a/p11-kit/tests/files/package-modules/win32/four.module b/p11-kit/fixtures/package-modules/win32/four.module index 6dc87c9..6dc87c9 100644 --- a/p11-kit/tests/files/package-modules/win32/four.module +++ b/p11-kit/fixtures/package-modules/win32/four.module diff --git a/p11-kit/tests/files/system-modules/one.module b/p11-kit/fixtures/system-modules/one.module index 5f49a8f..5f49a8f 100644 --- a/p11-kit/tests/files/system-modules/one.module +++ b/p11-kit/fixtures/system-modules/one.module diff --git a/p11-kit/tests/files/system-modules/two-duplicate.module b/p11-kit/fixtures/system-modules/two-duplicate.module index 756af69..756af69 100644 --- a/p11-kit/tests/files/system-modules/two-duplicate.module +++ b/p11-kit/fixtures/system-modules/two-duplicate.module diff --git a/p11-kit/tests/files/system-modules/two.badname b/p11-kit/fixtures/system-modules/two.badname index eec3af0..eec3af0 100644 --- a/p11-kit/tests/files/system-modules/two.badname +++ b/p11-kit/fixtures/system-modules/two.badname diff --git a/p11-kit/tests/files/system-modules/win32/one.module b/p11-kit/fixtures/system-modules/win32/one.module index d153ce5..d153ce5 100644 --- a/p11-kit/tests/files/system-modules/win32/one.module +++ b/p11-kit/fixtures/system-modules/win32/one.module diff --git a/p11-kit/tests/files/system-modules/win32/two-duplicate.module b/p11-kit/fixtures/system-modules/win32/two-duplicate.module index 54ef1cc..54ef1cc 100644 --- a/p11-kit/tests/files/system-modules/win32/two-duplicate.module +++ b/p11-kit/fixtures/system-modules/win32/two-duplicate.module diff --git a/p11-kit/tests/files/system-modules/win32/two.badname b/p11-kit/fixtures/system-modules/win32/two.badname index af63cf9..af63cf9 100644 --- a/p11-kit/tests/files/system-modules/win32/two.badname +++ b/p11-kit/fixtures/system-modules/win32/two.badname diff --git a/p11-kit/tests/files/system-pkcs11.conf b/p11-kit/fixtures/system-pkcs11.conf index a3aa273..a3aa273 100644 --- a/p11-kit/tests/files/system-pkcs11.conf +++ b/p11-kit/fixtures/system-pkcs11.conf diff --git a/p11-kit/tests/files/test-1.conf b/p11-kit/fixtures/test-1.conf index d4ae0a1..d4ae0a1 100644 --- a/p11-kit/tests/files/test-1.conf +++ b/p11-kit/fixtures/test-1.conf diff --git a/p11-kit/tests/files/test-pinfile b/p11-kit/fixtures/test-pinfile index f646f3d..f646f3d 100644 --- a/p11-kit/tests/files/test-pinfile +++ b/p11-kit/fixtures/test-pinfile diff --git a/p11-kit/tests/files/test-pinfile-large b/p11-kit/fixtures/test-pinfile-large index 506668d..506668d 100644 --- a/p11-kit/tests/files/test-pinfile-large +++ b/p11-kit/fixtures/test-pinfile-large diff --git a/p11-kit/tests/files/test-system-invalid.conf b/p11-kit/fixtures/test-system-invalid.conf index 344ee96..344ee96 100644 --- a/p11-kit/tests/files/test-system-invalid.conf +++ b/p11-kit/fixtures/test-system-invalid.conf diff --git a/p11-kit/tests/files/test-system-merge.conf b/p11-kit/fixtures/test-system-merge.conf index 978427d..978427d 100644 --- a/p11-kit/tests/files/test-system-merge.conf +++ b/p11-kit/fixtures/test-system-merge.conf diff --git a/p11-kit/tests/files/test-system-none.conf b/p11-kit/fixtures/test-system-none.conf index 95351e6..95351e6 100644 --- a/p11-kit/tests/files/test-system-none.conf +++ b/p11-kit/fixtures/test-system-none.conf diff --git a/p11-kit/tests/files/test-system-only.conf b/p11-kit/fixtures/test-system-only.conf index 589f1c7..589f1c7 100644 --- a/p11-kit/tests/files/test-system-only.conf +++ b/p11-kit/fixtures/test-system-only.conf diff --git a/p11-kit/tests/files/test-user-invalid.conf b/p11-kit/fixtures/test-user-invalid.conf index 344ee96..344ee96 100644 --- a/p11-kit/tests/files/test-user-invalid.conf +++ b/p11-kit/fixtures/test-user-invalid.conf diff --git a/p11-kit/tests/files/test-user-only.conf b/p11-kit/fixtures/test-user-only.conf index 3224c01..3224c01 100644 --- a/p11-kit/tests/files/test-user-only.conf +++ b/p11-kit/fixtures/test-user-only.conf diff --git a/p11-kit/tests/files/test-user.conf b/p11-kit/fixtures/test-user.conf index 369544a..369544a 100644 --- a/p11-kit/tests/files/test-user.conf +++ b/p11-kit/fixtures/test-user.conf diff --git a/p11-kit/tests/files/user-modules/one.module b/p11-kit/fixtures/user-modules/one.module index 5197daf..5197daf 100644 --- a/p11-kit/tests/files/user-modules/one.module +++ b/p11-kit/fixtures/user-modules/one.module diff --git a/p11-kit/tests/files/user-modules/three.module b/p11-kit/fixtures/user-modules/three.module index 3a2366d..3a2366d 100644 --- a/p11-kit/tests/files/user-modules/three.module +++ b/p11-kit/fixtures/user-modules/three.module diff --git a/p11-kit/tests/files/user-modules/win32/one.module b/p11-kit/fixtures/user-modules/win32/one.module index c371e4a..c371e4a 100644 --- a/p11-kit/tests/files/user-modules/win32/one.module +++ b/p11-kit/fixtures/user-modules/win32/one.module diff --git a/p11-kit/tests/files/user-modules/win32/three.module b/p11-kit/fixtures/user-modules/win32/three.module index 30a3b63..30a3b63 100644 --- a/p11-kit/tests/files/user-modules/win32/three.module +++ b/p11-kit/fixtures/user-modules/win32/three.module diff --git a/p11-kit/tests/frob-setuid.c b/p11-kit/frob-setuid.c index e546ece..e546ece 100644 --- a/p11-kit/tests/frob-setuid.c +++ b/p11-kit/frob-setuid.c diff --git a/p11-kit/tests/mock-module-ep.c b/p11-kit/mock-module-ep.c index 9ba739a..9ba739a 100644 --- a/p11-kit/tests/mock-module-ep.c +++ b/p11-kit/mock-module-ep.c diff --git a/p11-kit/tests/mock-module-ep2.c b/p11-kit/mock-module-ep2.c index ee71711..ee71711 100644 --- a/p11-kit/tests/mock-module-ep2.c +++ b/p11-kit/mock-module-ep2.c diff --git a/p11-kit/tests/print-messages.c b/p11-kit/print-messages.c index 5870ad1..5870ad1 100644 --- a/p11-kit/tests/print-messages.c +++ b/p11-kit/print-messages.c diff --git a/p11-kit/tests/test-conf.c b/p11-kit/test-conf.c index d5dc415..94b8b01 100644 --- a/p11-kit/tests/test-conf.c +++ b/p11-kit/test-conf.c @@ -58,7 +58,7 @@ test_parse_conf_1 (void) p11_dict *map; const char *value; - map = _p11_conf_parse_file (SRCDIR "/files/test-1.conf", NULL, 0); + map = _p11_conf_parse_file (SRCDIR "/p11-kit/fixtures/test-1.conf", NULL, 0); assert_ptr_not_null (map); value = p11_dict_get (map, "key1"); @@ -81,7 +81,7 @@ test_parse_ignore_missing (void) { p11_dict *map; - map = _p11_conf_parse_file (SRCDIR "/files/non-existant.conf", NULL, CONF_IGNORE_MISSING); + map = _p11_conf_parse_file (SRCDIR "/p11-kit/fixtures/non-existant.conf", NULL, CONF_IGNORE_MISSING); assert_ptr_not_null (map); assert_num_eq (0, p11_dict_size (map)); @@ -94,7 +94,7 @@ test_parse_fail_missing (void) { p11_dict *map; - map = _p11_conf_parse_file (SRCDIR "/files/non-existant.conf", NULL, 0); + map = _p11_conf_parse_file (SRCDIR "/p11-kit/fixtures/non-existant.conf", NULL, 0); assert (map == NULL); assert_ptr_not_null (p11_message_last ()); } @@ -134,8 +134,8 @@ test_load_globals_merge (void) p11_message_clear (); - config = _p11_conf_load_globals (SRCDIR "/files/test-system-merge.conf", - SRCDIR "/files/test-user.conf", + config = _p11_conf_load_globals (SRCDIR "/p11-kit/fixtures/test-system-merge.conf", + SRCDIR "/p11-kit/fixtures/test-user.conf", &user_mode); assert_ptr_not_null (config); assert (NULL == p11_message_last ()); @@ -156,8 +156,8 @@ test_load_globals_no_user (void) p11_message_clear (); - config = _p11_conf_load_globals (SRCDIR "/files/test-system-none.conf", - SRCDIR "/files/test-user.conf", + config = _p11_conf_load_globals (SRCDIR "/p11-kit/fixtures/test-system-none.conf", + SRCDIR "/p11-kit/fixtures/test-user.conf", &user_mode); assert_ptr_not_null (config); assert (NULL == p11_message_last ()); @@ -178,8 +178,8 @@ test_load_globals_user_sets_only (void) p11_message_clear (); - config = _p11_conf_load_globals (SRCDIR "/files/test-system-merge.conf", - SRCDIR "/files/test-user-only.conf", + config = _p11_conf_load_globals (SRCDIR "/p11-kit/fixtures/test-system-merge.conf", + SRCDIR "/p11-kit/fixtures/test-user-only.conf", &user_mode); assert_ptr_not_null (config); assert (NULL == p11_message_last ()); @@ -200,8 +200,8 @@ test_load_globals_system_sets_only (void) p11_message_clear (); - config = _p11_conf_load_globals (SRCDIR "/files/test-system-only.conf", - SRCDIR "/files/test-user.conf", + config = _p11_conf_load_globals (SRCDIR "/p11-kit/fixtures/test-system-only.conf", + SRCDIR "/p11-kit/fixtures/test-user.conf", &user_mode); assert_ptr_not_null (config); assert (NULL == p11_message_last ()); @@ -223,8 +223,8 @@ test_load_globals_system_sets_invalid (void) p11_message_clear (); - config = _p11_conf_load_globals (SRCDIR "/files/test-system-invalid.conf", - SRCDIR "/files/non-existant.conf", + config = _p11_conf_load_globals (SRCDIR "/p11-kit/fixtures/test-system-invalid.conf", + SRCDIR "/p11-kit/fixtures/non-existant.conf", &user_mode); error = errno; assert_ptr_eq (NULL, config); @@ -243,8 +243,8 @@ test_load_globals_user_sets_invalid (void) p11_message_clear (); - config = _p11_conf_load_globals (SRCDIR "/files/test-system-merge.conf", - SRCDIR "/files/test-user-invalid.conf", + config = _p11_conf_load_globals (SRCDIR "/p11-kit/fixtures/test-system-merge.conf", + SRCDIR "/p11-kit/fixtures/test-user-invalid.conf", &user_mode); error = errno; assert_ptr_eq (NULL, config); @@ -270,9 +270,9 @@ test_load_modules_merge (void) p11_message_clear (); configs = _p11_conf_load_modules (CONF_USER_MERGE, - SRCDIR "/files/package-modules", - SRCDIR "/files/system-modules", - SRCDIR "/files/user-modules"); + SRCDIR "/p11-kit/fixtures/package-modules", + SRCDIR "/p11-kit/fixtures/system-modules", + SRCDIR "/p11-kit/fixtures/user-modules"); assert_ptr_not_null (configs); assert (assert_msg_contains (p11_message_last (), "invalid config filename")); @@ -303,9 +303,9 @@ test_load_modules_user_none (void) p11_message_clear (); configs = _p11_conf_load_modules (CONF_USER_NONE, - SRCDIR "/files/package-modules", - SRCDIR "/files/system-modules", - SRCDIR "/files/user-modules"); + SRCDIR "/p11-kit/fixtures/package-modules", + SRCDIR "/p11-kit/fixtures/system-modules", + SRCDIR "/p11-kit/fixtures/user-modules"); assert_ptr_not_null (configs); assert (assert_msg_contains (p11_message_last (), "invalid config filename")); @@ -334,9 +334,9 @@ test_load_modules_user_only (void) p11_message_clear (); configs = _p11_conf_load_modules (CONF_USER_ONLY, - SRCDIR "/files/package-modules", - SRCDIR "/files/system-modules", - SRCDIR "/files/user-modules"); + SRCDIR "/p11-kit/fixtures/package-modules", + SRCDIR "/p11-kit/fixtures/system-modules", + SRCDIR "/p11-kit/fixtures/user-modules"); assert_ptr_not_null (configs); assert_ptr_eq (NULL, (void *)p11_message_last ()); @@ -365,9 +365,9 @@ test_load_modules_no_user (void) p11_message_clear (); configs = _p11_conf_load_modules (CONF_USER_MERGE, - SRCDIR "/files/package-modules", - SRCDIR "/files/system-modules", - SRCDIR "/files/non-existant"); + SRCDIR "/p11-kit/fixtures/package-modules", + SRCDIR "/p11-kit/fixtures/system-modules", + SRCDIR "/p11-kit/fixtures/non-existant"); assert_ptr_not_null (configs); assert (assert_msg_contains (p11_message_last (), "invalid config filename")); diff --git a/p11-kit/tests/test-deprecated.c b/p11-kit/test-deprecated.c index c8b8001..c8b8001 100644 --- a/p11-kit/tests/test-deprecated.c +++ b/p11-kit/test-deprecated.c diff --git a/p11-kit/tests/test-init.c b/p11-kit/test-init.c index c4fcecb..c4fcecb 100644 --- a/p11-kit/tests/test-init.c +++ b/p11-kit/test-init.c diff --git a/p11-kit/tests/test-iter.c b/p11-kit/test-iter.c index 055a4b3..055a4b3 100644 --- a/p11-kit/tests/test-iter.c +++ b/p11-kit/test-iter.c diff --git a/p11-kit/tests/test-log.c b/p11-kit/test-log.c index e7dab70..e7dab70 100644 --- a/p11-kit/tests/test-log.c +++ b/p11-kit/test-log.c diff --git a/p11-kit/tests/test-managed.c b/p11-kit/test-managed.c index c4ccd9a..c4ccd9a 100644 --- a/p11-kit/tests/test-managed.c +++ b/p11-kit/test-managed.c diff --git a/p11-kit/tests/test-mock.c b/p11-kit/test-mock.c index 8454f1f..8454f1f 100644 --- a/p11-kit/tests/test-mock.c +++ b/p11-kit/test-mock.c diff --git a/p11-kit/tests/test-modules.c b/p11-kit/test-modules.c index f274502..f274502 100644 --- a/p11-kit/tests/test-modules.c +++ b/p11-kit/test-modules.c diff --git a/p11-kit/tests/test-pin.c b/p11-kit/test-pin.c index ebe3efc..27e20c8 100644 --- a/p11-kit/tests/test-pin.c +++ b/p11-kit/test-pin.c @@ -234,7 +234,7 @@ test_pin_file (void) p11_kit_pin_register_callback (P11_KIT_PIN_FALLBACK, p11_kit_pin_file_callback, NULL, NULL); - pin = p11_kit_pin_request (SRCDIR "/files/test-pinfile", uri, "The token", + pin = p11_kit_pin_request (SRCDIR "/p11-kit/fixtures/test-pinfile", uri, "The token", P11_KIT_PIN_FLAGS_USER_LOGIN); assert_ptr_not_null (pin); @@ -243,7 +243,7 @@ test_pin_file (void) assert (memcmp (ptr, "yogabbagabba", length) == 0); p11_kit_pin_unref (pin); - pin = p11_kit_pin_request (SRCDIR "/files/nonexistant", uri, "The token", + pin = p11_kit_pin_request (SRCDIR "/p11-kit/fixtures/nonexistant", uri, "The token", P11_KIT_PIN_FLAGS_USER_LOGIN); assert_ptr_eq (NULL, pin); @@ -266,7 +266,7 @@ test_pin_file_large (void) p11_kit_pin_register_callback (P11_KIT_PIN_FALLBACK, p11_kit_pin_file_callback, NULL, NULL); - pin = p11_kit_pin_request (SRCDIR "/files/test-pinfile-large", uri, "The token", + pin = p11_kit_pin_request (SRCDIR "/p11-kit/fixtures/test-pinfile-large", uri, "The token", P11_KIT_PIN_FLAGS_USER_LOGIN); error = errno; diff --git a/p11-kit/tests/test-progname.c b/p11-kit/test-progname.c index 76b136d..76b136d 100644 --- a/p11-kit/tests/test-progname.c +++ b/p11-kit/test-progname.c diff --git a/p11-kit/tests/test-proxy.c b/p11-kit/test-proxy.c index bf5007d..bf5007d 100644 --- a/p11-kit/tests/test-proxy.c +++ b/p11-kit/test-proxy.c diff --git a/p11-kit/tests/test-rpc.c b/p11-kit/test-rpc.c index 0ce2c55..0ce2c55 100644 --- a/p11-kit/tests/test-rpc.c +++ b/p11-kit/test-rpc.c diff --git a/p11-kit/tests/test-transport.c b/p11-kit/test-transport.c index 4656d34..c302230 100644 --- a/p11-kit/tests/test-transport.c +++ b/p11-kit/test-transport.c @@ -68,7 +68,7 @@ setup_remote (void *unused) test.user_config = p11_path_build (test.directory, "pkcs11.conf", NULL); p11_test_file_write (NULL, test.user_config, data, strlen (data)); - data = "remote: |" BUILDDIR "/../p11-kit remote " BUILDDIR "/.libs/mock-two.so\n"; + data = "remote: |" BUILDDIR "/p11-kit/p11-kit remote " BUILDDIR "/.libs/mock-two.so\n"; p11_test_file_write (test.user_modules, "remote.module", data, strlen (data)); p11_config_user_modules = test.user_modules; diff --git a/p11-kit/tests/test-uri.c b/p11-kit/test-uri.c index 9b5b293..9b5b293 100644 --- a/p11-kit/tests/test-uri.c +++ b/p11-kit/test-uri.c diff --git a/p11-kit/tests/test-util.c b/p11-kit/test-util.c index 0e579cd..0e579cd 100644 --- a/p11-kit/tests/test-util.c +++ b/p11-kit/test-util.c diff --git a/p11-kit/tests/test-virtual.c b/p11-kit/test-virtual.c index 73777d3..73777d3 100644 --- a/p11-kit/tests/test-virtual.c +++ b/p11-kit/test-virtual.c diff --git a/p11-kit/tests/Makefile.am b/p11-kit/tests/Makefile.am deleted file mode 100644 index a7049a4..0000000 --- a/p11-kit/tests/Makefile.am +++ /dev/null @@ -1,91 +0,0 @@ - -include $(top_srcdir)/build/Makefile.tests - -COMMON = $(top_srcdir)/common - -AM_CPPFLAGS = \ - -I$(top_srcdir) \ - -I$(srcdir)/.. \ - -I$(COMMON) \ - $(TEST_CFLAGS) - -LDADD = \ - $(top_builddir)/p11-kit/libp11-kit-testable.la \ - $(top_builddir)/common/libp11-test.la \ - $(top_builddir)/common/libp11-common.la \ - $(LTLIBINTL) - -CHECK_PROGS = \ - test-progname \ - test-util \ - test-conf \ - test-uri \ - test-pin \ - test-init \ - test-modules \ - test-deprecated \ - test-proxy \ - test-iter \ - test-rpc \ - $(NULL) - -noinst_PROGRAMS = \ - print-messages \ - frob-setuid \ - $(CHECK_PROGS) - -if WITH_FFI - -CHECK_PROGS += \ - test-virtual \ - test-managed \ - test-log \ - test-transport \ - $(NULL) - -endif - -TESTS = $(CHECK_PROGS) - -noinst_LTLIBRARIES = \ - mock-one.la \ - mock-two.la \ - mock-three.la \ - mock-four.la - -mock_one_la_SOURCES = \ - mock-module-ep.c - -mock_one_la_CFLAGS = \ - $(AM_CFLAGS) - -mock_one_la_LIBADD = \ - $(top_builddir)/common/libp11-test.la \ - $(top_builddir)/common/libp11-common.la \ - $(NULL) - -mock_one_la_LDFLAGS = \ - -module -avoid-version -rpath /nowhere \ - -no-undefined -export-symbols-regex 'C_GetFunctionList' - -mock_two_la_SOURCES = \ - mock-module-ep2.c - -mock_two_la_CFLAGS = $(mock_one_la_CFLAGS) -mock_two_la_LDFLAGS = $(mock_one_la_LDFLAGS) -mock_two_la_LIBADD = $(mock_one_la_LIBADD) - -mock_three_la_SOURCES = $(mock_one_la_SOURCES) -mock_three_la_CFLAGS = $(mock_one_la_CFLAGS) -mock_three_la_LDFLAGS = $(mock_one_la_LDFLAGS) -mock_three_la_LIBADD = $(mock_one_la_LIBADD) - -mock_four_la_SOURCES = $(mock_one_la_SOURCES) -mock_four_la_CFLAGS = $(mock_one_la_CFLAGS) -mock_four_la_LDFLAGS = $(mock_one_la_LDFLAGS) -mock_four_la_LIBADD = $(mock_one_la_LIBADD) - -EXTRA_DIST = \ - files \ - test-mock.c \ - $(NULL) |