diff options
author | Michael Cronenworth <mike@cchtml.com> | 2014-09-09 16:19:34 +0200 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2014-09-09 16:20:21 +0200 |
commit | 1ede9a957c5a4f2c44b6bc88ba380a41c145a81b (patch) | |
tree | 0f35144db8f594405f7ef187f77841bb56e15d77 /p11-kit/test-managed.c | |
parent | 086c08ceef86825b7b738c2da016915e91896a20 (diff) | |
download | p11-kit-1ede9a957c5a4f2c44b6bc88ba380a41c145a81b.tar.gz |
p11-kit: Fix tests when building with MinGW
Signed-off-by: Michael Cronenworth <mike@cchtml.com>
Diffstat (limited to 'p11-kit/test-managed.c')
-rw-r--r-- | p11-kit/test-managed.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/p11-kit/test-managed.c b/p11-kit/test-managed.c index c4ccd9a..fc673ea 100644 --- a/p11-kit/test-managed.c +++ b/p11-kit/test-managed.c @@ -43,7 +43,9 @@ #include "virtual.h" #include <sys/types.h> +#ifdef OS_UNIX #include <sys/wait.h> +#endif #include <errno.h> #include <stdlib.h> #include <stdio.h> @@ -196,6 +198,8 @@ test_separate_close_all_sessions (void) teardown_mock_module (second); } +#ifdef OS_UNIX + static void test_fork_and_reinitialize (void) { @@ -239,6 +243,8 @@ test_fork_and_reinitialize (void) teardown_mock_module (module); } +#endif /* OS_UNIX */ + /* Bring in all the mock module tests */ #include "test-mock.c" @@ -252,7 +258,10 @@ main (int argc, p11_test (test_initialize_finalize, "/managed/test_initialize_finalize"); p11_test (test_initialize_fail, "/managed/test_initialize_fail"); p11_test (test_separate_close_all_sessions, "/managed/test_separate_close_all_sessions"); + +#ifdef OS_UNIX p11_test (test_fork_and_reinitialize, "/managed/fork-and-reinitialize"); +#endif test_mock_add_tests ("/managed"); |