summaryrefslogtreecommitdiff
path: root/trust/tests/test-module.c
diff options
context:
space:
mode:
authorStef Walter <stefw@redhat.com>2013-04-03 10:50:59 +0200
committerStef Walter <stefw@gnome.org>2013-04-03 12:45:43 +0200
commita63311a0f3f2669138d09ff8f618fd4d12fa0c3d (patch)
treed5a9b8cd32dda2e0e1eff1a8393b5dcb2174f86b /trust/tests/test-module.c
parentc3f1b0a45eb1c28b6f025f8ae56c3b020801b6aa (diff)
More compatible path munging and handling code
Centralize the path handling code, so we can remove unixy assumptions and have a chance of running on Windows. The current goal is to run all the tests on Windows. Includes some code from LRN <lrn1986@gmail.com> https://bugs.freedesktop.org/show_bug.cgi?id=63062
Diffstat (limited to 'trust/tests/test-module.c')
-rw-r--r--trust/tests/test-module.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/trust/tests/test-module.c b/trust/tests/test-module.c
index 525a68e..4facf3b 100644
--- a/trust/tests/test-module.c
+++ b/trust/tests/test-module.c
@@ -44,6 +44,7 @@
#include "attrs.h"
#include "hash.h"
#include "library.h"
+#include "path.h"
#include "pkcs11x.h"
#include "test-data.h"
#include "token.h"
@@ -81,7 +82,9 @@ setup (CuTest *cu)
CuAssertTrue (cu, rv == CKR_OK);
memset (&args, 0, sizeof (args));
- paths = SRCDIR "/input:" SRCDIR "/files/self-signed-with-ku.der:" SRCDIR "/files/thawte.pem";
+ paths = SRCDIR "/input" P11_PATH_SEP \
+ SRCDIR "/files/self-signed-with-ku.der" P11_PATH_SEP \
+ SRCDIR "/files/thawte.pem";
if (asprintf (&arguments, "paths='%s'", paths) < 0)
CuAssertTrue (cu, false && "not reached");
args.pReserved = arguments;
@@ -204,7 +207,10 @@ test_get_token_info (CuTest *cu)
CuAssertTrue (cu, rv == CKR_OK);
memset (&args, 0, sizeof (args));
- args.pReserved = "paths='" SYSCONFDIR "/input:" DATADIR "/files/blah:" "/some/other/path/the-basename'";
+ args.pReserved = "paths='" \
+ SYSCONFDIR "/input" P11_PATH_SEP \
+ DATADIR "/files/blah" P11_PATH_SEP \
+ "/some/other/path/the-basename'";
args.flags = CKF_OS_LOCKING_OK;
rv = module->C_Initialize (&args);