From: brarcher Date: Sun, 22 Sep 2013 17:23:02 +0000 (+0000) Subject: If fork unavailable, run tests with CK_NOFORK X-Git-Tag: 0.10.0~443 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=40f758c4c1e7e38cfe19304fe9d30b17c35dbc94;p=check If fork unavailable, run tests with CK_NOFORK Although the tests which check the correctness of fork-based tests are disabled if fork is unavailable, the remaining tests were still run assuming fork was available. If there is no fork, run tests cases with CK_NOFORK git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@771 64e312b2-a51f-0410-8e61-82d0ca0eb02a --- diff --git a/tests/check_check_export_main.c b/tests/check_check_export_main.c index 4478273..27d61a9 100644 --- a/tests/check_check_export_main.c +++ b/tests/check_check_export_main.c @@ -16,6 +16,14 @@ int main (void) srunner_add_suite(sr, make_log_suite()); srunner_add_suite(sr, make_fork_suite()); +#if !defined(HAVE_FORK) + /* + * Overriding the default of running tests in fork mode, + * as this system does not have fork() + */ + srunner_set_fork_status(sr,CK_NOFORK); +#endif /* !HAVE_FORK */ + printf ("Ran %d tests in subordinate suite\n", sub_ntests); srunner_run_all (sr, CK_VERBOSE); cleanup(); diff --git a/tests/check_check_master.c b/tests/check_check_master.c index 42d3137..0c92c97 100644 --- a/tests/check_check_master.c +++ b/tests/check_check_master.c @@ -456,6 +456,15 @@ void setup (void) init_signal_strings(); srunner_add_suite(sr, make_sub2_suite()); + +#if !defined(HAVE_FORK) + /* + * Overriding the default of running tests in fork mode, + * as this system does not have fork() + */ + srunner_set_fork_status(sr,CK_NOFORK); +#endif /* !HAVE_FORK */ + srunner_run_all(sr, CK_VERBOSE); tr_fail_array = srunner_failures(sr); tr_all_array = srunner_results(sr);