From 6c55425a7de23a71d0abc3137f0015e878188bae Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Sun, 3 Mar 2013 10:03:40 +0100 Subject: Windows doesn't support symlinks, chmod, or atomic renames * Don't create symlinks on windows * No atomic renames, so delete and then rename * Make sure to close files before unlinking on windows * No chmod permissions on windows --- tools/tests/test.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tools/tests/test.h') diff --git a/tools/tests/test.h b/tools/tests/test.h index 7cf2492..82b8b2c 100644 --- a/tools/tests/test.h +++ b/tools/tests/test.h @@ -221,6 +221,8 @@ void test_check_data_msg (CuTest *tc, const void *refdata, long reflen); +#ifdef OS_UNIX + void test_check_symlink_msg (CuTest *tc, const char *file, int line, @@ -228,6 +230,8 @@ void test_check_symlink_msg (CuTest *tc, const char *name, const char *destination); +#endif /* OS_UNIX */ + p11_dict * test_check_directory_files (const char *file, ...) GNUC_NULL_TERMINATED; @@ -243,9 +247,13 @@ void test_check_directory_msg (CuTest *tc, #define test_check_data(tc, directory, name, data, length) \ (test_check_data_msg (tc, __FILE__, __LINE__, directory, name, data, length)) +#ifdef OS_UNIX + #define test_check_symlink(tc, directory, name, destination) \ (test_check_symlink_msg (tc, __FILE__, __LINE__, directory, name, destination)) +#endif /* OS_UNIX */ + #define test_check_directory(tc, directory, files) \ (test_check_directory_msg (tc, __FILE__, __LINE__, directory, \ test_check_directory_files files)) -- cgit v1.1