From 773d678c6a772b9e771530dfea4239b9c7615bf7 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 20 Feb 2017 22:03:11 -0500 Subject: [PATCH] test: skip fork fsevent cases when lacking support On platforms not supporting fsevents do not run the fork fsevent tests. PR-URL: https://github.com/libuv/libuv/pull/1312 Reviewed-By: Ben Noordhuis Reviewed-By: Santiago Gimeno --- test/test-fork.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/test/test-fork.c b/test/test-fork.c index c760de89..3716a3ad 100644 --- a/test/test-fork.c +++ b/test/test-fork.c @@ -506,17 +506,18 @@ static int _do_fork_fs_events_child(int file_or_dir) { TEST_IMPL(fork_fs_events_child) { -#if defined(__MVS__) - RETURN_SKIP("Filesystem watching not supported on this platform."); +#if defined(NO_FS_EVENTS) + RETURN_SKIP(NO_FS_EVENTS); #endif return _do_fork_fs_events_child(FS_TEST_FILE); } TEST_IMPL(fork_fs_events_child_dir) { -#if defined(__MVS__) - RETURN_SKIP("Filesystem watching not supported on this platform."); -#elif defined(__APPLE__) || defined (__linux__) +#if defined(NO_FS_EVENTS) + RETURN_SKIP(NO_FS_EVENTS); +#endif +#if defined(__APPLE__) || defined (__linux__) return _do_fork_fs_events_child(FS_TEST_DIR); #else /* You can't spin up a cfrunloop thread on an apple platform @@ -529,9 +530,10 @@ TEST_IMPL(fork_fs_events_child_dir) { TEST_IMPL(fork_fs_events_file_parent_child) { -#if defined(__MVS__) - RETURN_SKIP("Filesystem watching not supported on this platform."); -#elif defined(__sun) || defined(_AIX) +#if defined(NO_FS_EVENTS) + RETURN_SKIP(NO_FS_EVENTS); +#endif +#if defined(__sun) || defined(_AIX) /* It's not possible to implement this without additional * bookkeeping on SunOS. For AIX it is possible, but has to be * written. See https://github.com/libuv/libuv/pull/846#issuecomment-287170420