From a831ddac20c6250f14f0660e6b9ab73983681f40 Mon Sep 17 00:00:00 2001 From: amalec Date: Thu, 6 Sep 2001 18:10:22 +0000 Subject: [PATCH] Added initial control functions to control forking git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@91 64e312b2-a51f-0410-8e61-82d0ca0eb02a --- check/Doxyfile | 8 +- check/configure.in | 4 +- check/src/check.h | 269 +++++++++++++++------------------ check/src/check_impl.h | 5 +- check/src/check_log.c | 8 +- check/src/check_log.h | 8 +- check/src/check_print.c | 18 ++- check/src/check_print.h | 4 +- check/src/check_run.c | 26 +++- check/tests/Makefile.am | 1 + check/tests/Makefile.in | 14 +- check/tests/check_check.h | 2 +- check/tests/check_check_main.c | 1 + 13 files changed, 183 insertions(+), 185 deletions(-) diff --git a/check/Doxyfile b/check/Doxyfile index ec744fb..a82433f 100644 --- a/check/Doxyfile +++ b/check/Doxyfile @@ -4,12 +4,12 @@ # General configuration options #--------------------------------------------------------------------------- PROJECT_NAME = Check -PROJECT_NUMBER = 0.7.0 +PROJECT_NUMBER = 0.8.0 OUTPUT_DIRECTORY = ./doc/ OUTPUT_LANGUAGE = English EXTRACT_ALL = NO EXTRACT_PRIVATE = NO -EXTRACT_STATIC = NO +EXTRACT_STATIC = YES HIDE_UNDOC_MEMBERS = NO HIDE_UNDOC_CLASSES = NO BRIEF_MEMBER_DESC = YES @@ -33,11 +33,11 @@ INLINE_INFO = YES SORT_MEMBER_DOCS = YES DISTRIBUTE_GROUP_DOC = NO TAB_SIZE = 8 -ENABLED_SECTIONS = GENERATE_TODOLIST = YES GENERATE_TESTLIST = YES GENERATE_BUGLIST = YES ALIASES = +ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 OPTIMIZE_OUTPUT_FOR_C = YES SHOW_USED_FILES = YES @@ -141,10 +141,12 @@ PERL_PATH = /usr/bin/perl HAVE_DOT = NO CLASS_GRAPH = YES COLLABORATION_GRAPH = YES +TEMPLATE_RELATIONS = YES INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES GRAPHICAL_HIERARCHY = YES DOT_PATH = +DOTFILE_DIRS = MAX_DOT_GRAPH_WIDTH = 1024 MAX_DOT_GRAPH_HEIGHT = 1024 GENERATE_LEGEND = YES diff --git a/check/configure.in b/check/configure.in index a7ccc61..1db6165 100644 --- a/check/configure.in +++ b/check/configure.in @@ -40,8 +40,10 @@ AC_TYPE_PID_T AC_TYPE_SIZE_T dnl Checks for library functions. +dnl AC_FUNC_FORK +dnl AC_FUNC_MALLOC AC_FUNC_VPRINTF -AC_CHECK_FUNCS(strerror) +AC_CHECK_FUNCS([strerror]) AC_OUTPUT(Makefile src/Makefile diff --git a/check/src/check.h b/check/src/check.h index 21b911f..6f1f010 100644 --- a/check/src/check.h +++ b/check/src/check.h @@ -20,272 +20,247 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Comments are in Doxygen format: see http://www.stack.nl/~dimitri/doxygen/ */ -/*! \mainpage Check: a unit test framework for C +/* Check: a unit test framework for C -\section overview + Check is a unit test framework for C. It features a simple + interface for defining unit tests, putting little in the way of the + developer. Tests are run in a separate address space, so Check can + catch both assertion failures and code errors that cause + segmentation faults or other signals. The output from unit tests + can be used within source code editors and IDEs. -Overview Check is a unit test framework for C. It features a simple -interface for defining unit tests, putting little in the way of the -developer. Tests are run in a separate address space, so Check can -catch both assertion failures and code errors that cause segmentation -faults or other signals. The output from unit tests can be used within -source code editors and IDEs. + Unit tests are created with the START_TEST/END_TEST macro + pair. The fail_unless and fail macros are used for creating + checks within unit tests; the mark_point macro is useful for + trapping the location of signals and/or early exits. -\section quickref Quick Reference -\subsection creating Creating + Test cases are created with tcase_create, unit tests are added + with tcase_add_test -\par -Unit tests are created with the #START_TEST/#END_TEST macro pair. The -#fail_unless and #fail macros are used for creating checks within unit -tests; the #mark_point macro is useful for trapping the location of -signals and/or early exits. + Suites are created with suite_create, freed with suite_free; test + cases are added with suite_add_tcase -\subsection managing Managing test cases and suites + Suites are run through an SRunner, which is created with + srunner_create, freed with srunner_free. Additional suites can be + added to an SRunner with srunner_add_suite. -\par - -Test cases are created with #tcase_create, unit tests are added -with #tcase_add_test - -\par - -Suites are created with #suite_create, freed with #suite_free; test -cases are added with #suite_add_tcase - -\subsection running Running suites - -\par - -Suites are run through an SRunner, which is created with -#srunner_create, freed with #srunner_free. Additional suites can be -added to an SRunner with #srunner_add_suite. - -\par - -Use #srunner_run_all to run a suite and print results. + Use srunner_run_all to run a suite and print results. */ -/*! \file check.h */ #ifdef __cplusplus -extern "C" { -#endif - - -/*! \defgroup check_core Check Core - Core suite/test case types and functions - @{ -*/ - -/*! \brief opaque type for a test suite */ -typedef struct Suite Suite; +#define CK_CPPSTART extern "C" { +CK_CPPSTART +#endif + -/*! \brief opaque type for a test case +/* opaque type for a test case -A TCase represents a test case. Create with #tcase_create, free with -#tcase_free. For the moment, test cases can only be run through a -suite + A TCase represents a test case. Create with tcase_create, free + with tcase_free. For the moment, test cases can only be run + through a suite */ typedef struct TCase TCase; -/*! type for a test function */ +/* type for a test function */ typedef void (*TFun) (void); -/*! type for a setup/teardown function */ +/* type for a setup/teardown function */ typedef void (*SFun) (void); - -/*! Create a test suite */ + +/* Opaque type for a test suite */ +typedef struct Suite Suite; + +/* Creates a test suite with the given name +*/ Suite *suite_create (char *name); -/*! Free a test suite - (For the moment, this also frees all contained test cases) */ +/* Free a test suite (For the moment, this also frees all contained + test cases) */ void suite_free (Suite *s); -/*! Create a test case */ +/* Add a test case to a suite */ +void suite_add_tcase (Suite *s, TCase *tc); + +/* Create a test case */ TCase *tcase_create (char *name); -/*! Free a test case - (Note that as it stands, one will normally free the contaning suite) */ +/* Free a test case + + (Note that as it stands, one will normally free the contaning + suite) */ void tcase_free (TCase *tc); -/*! Add a test case to a suite */ -void suite_add_tcase (Suite *s, TCase *tc); -/*! Add a test function to a test case +/* Add a test function to a test case (macro version) */ + #define tcase_add_test(tc,tf) _tcase_add_test(tc,tf,"" # tf "") -/*! Add a test function to a test case + +/* Add a test function to a test case (function version -- use this when the macro won't work */ void _tcase_add_test (TCase *tc, TFun tf, char *fname); -/*! +/* Add fixture setup/teardown functions to a test case -Add fixture setup/teardown functions to a test case Note that -setup/teardown functions are not run in a separate address space, like -test functions, and so must not exit or signal (e.g., segfault) + Note that setup/teardown functions are not run in a separate + address space, like test functions, and so must not exit or signal + (e.g., segfault) */ void tcase_set_fixture(TCase *tc, SFun setup, SFun teardown); -/*! Internal function to mark the start of a test function */ +/* Internal function to mark the start of a test function */ void tcase_fn_start (char *fname, char *file, int line); -/*! Start a unit test with START_TEST(unit_name), end with END_TEST - One must use braces within a START_/END_ pair to declare new variables */ +/* Start a unit test with START_TEST(unit_name), end with END_TEST + One must use braces within a START_/END_ pair to declare new variables */ + #define START_TEST(__testname)\ static void __testname (void)\ {\ tcase_fn_start (""# __testname, __FILE__, __LINE__); -/*! End a unit test */ +/* End a unit test */ #define END_TEST } -/*! Fail the test case unless result is true */ +/* Fail the test case unless result is true */ #define fail_unless(result,msg) _fail_unless(result,__FILE__,__LINE__,msg) -/*! Non macro version of #fail_unless, with more complicated interface */ +/* Non macro version of #fail_unless, with more complicated interface */ void _fail_unless (int result, char *file, int line, char *msg); -/*! Always fail */ +/* Always fail */ #define fail(msg) _fail_unless(0,__FILE__,__LINE__,msg) -/*! Mark the last point reached in a unit test - (useful for tracking down where a segfault, etc. occurs */ +/* Mark the last point reached in a unit test + + (useful for tracking down where a segfault, etc. occurs) */ #define mark_point() _mark_point(__FILE__,__LINE__) -/*! Non macro version of #mark_point */ -void _mark_point (char *file, int line); - -/*! @} */ - -/*! \defgroup check_run Suite running functions - @{ -*/ +/* Non macro version of #mark_point */ +void _mark_point (char *file, int line); -/*! Result of a test */ +/* Result of a test */ enum test_result { - CRPASS, /*!< Test passed*/ - CRFAILURE, /*!< Test completed but failed */ - CRERROR /*!< Test failed to complete (signal or non-zero early exit) */ + CRPASS, /* Test passed*/ + CRFAILURE, /* Test completed but failed */ + CRERROR /* Test failed to complete (signal or non-zero early exit) */ }; -/*! Specifies the verbosity of srunner printing */ -enum print_verbosity { - CRSILENT, /*!< No output */ - CRMINIMAL, /*!< Only summary output */ - CRNORMAL, /*!< All failed tests */ - CRVERBOSE, /*!< All tests */ +/* Specifies the how much output an SRunner should produce */ +enum print_output { + CRSILENT, /* No output */ + CRMINIMAL, /* Only summary output */ + CRNORMAL, /* All failed tests */ + CRVERBOSE, /* All tests */ CRLAST }; -/*! Holds state for a running of a test suite */ +/* Holds state for a running of a test suite */ typedef struct SRunner SRunner; -/*! Opaque type for a test failure */ +/* Opaque type for a test failure */ typedef struct TestResult TestResult; /* accessors for tr fields */ -/*! Type of result */ +/* Type of result */ int tr_rtype (TestResult *tr); -/*! Failure message */ +/* Failure message */ char *tr_msg (TestResult *tr); -/*! Line number at which failure occured */ +/* Line number at which failure occured */ int tr_lno (TestResult *tr); -/*! File name at which failure occured */ +/* File name at which failure occured */ char *tr_lfile (TestResult *tr); -/*! Test case in which unit test was run */ +/* Test case in which unit test was run */ char *tr_tcname (TestResult *tr); -/*! Creates an SRunner for the given suite */ +/* Creates an SRunner for the given suite */ SRunner *srunner_create (Suite *s); -/*! Adds a Suite to an SRunner */ +/* Adds a Suite to an SRunner */ void srunner_add_suite (SRunner *sr, Suite *s); -/*! Frees an SRunner */ +/* Frees an SRunner */ void srunner_free (SRunner *sr); /* Test running */ -/*! Runs an SRunner, printing results as specified - (see enum #print_verbosity)*/ -void srunner_run_all (SRunner *sr, int print_mode); +/* Runs an SRunner, printing results as specified (see enum + print_output)*/ +void srunner_run_all (SRunner *sr, enum print_output print_mode); /* Next functions are valid only after the suite has been completely run, of course */ -/*! Number of failed tests in a run suite +/* Number of failed tests in a run suite + Includes failures + errors */ int srunner_ntests_failed (SRunner *sr); -/*! Total number of tests run in a run suite */ +/* Total number of tests run in a run suite */ int srunner_ntests_run (SRunner *sr); -/*! \brief Return an array of results for all failures +/* Return an array of results for all failures - Number of failures is equal to #srunner_nfailed_tests. Memory is - alloc'ed and must be freed, but individual TestResults must not */ + Number of failures is equal to srunner_nfailed_tests. Memory for + the array is malloc'ed and must be freed, but individual TestResults + must not */ TestResult **srunner_failures (SRunner *sr); -/*! \brief Return an array of results for all run tests +/* Return an array of results for all run tests + + Number of results is equal to srunner_ntests_run -Number of failrues is equal to #srunner_ntests_run Memory is alloc'ed -and must be freed, but individual TestResults must not */ + Memory is malloc'ed and must be freed, but individual TestResults + must not */ TestResult **srunner_results (SRunner *sr); - /* Printing */ - -/*! Print the results contained in an SRunner +/* Printing */ -\param sr SRunner for which results are printed - -\param print_mode Specification of print verbosity, constrainted to -enum #print_verbosity +/* Print the results contained in an SRunner */ - void srunner_print (SRunner *sr, int print_mode); + +void srunner_print (SRunner *sr, enum print_output print_mode); -/*! @} */ - - -/*! \defgroup check_log Logging functions - @{ -*/ -/*! Set a log file to which to write during test running. - Log file setting is an initialize only operation -- it should be done - immediatly after SRunner creation, and the log file can't be changed - after being set. - \param sr The SRunner for which to enable logging - \param fname The file name to which to write the log +/* Set a log file to which to write during test running. + + Log file setting is an initialize only operation -- it should be + done immediatly after SRunner creation, and the log file can't be + changed after being set. */ void srunner_set_log (SRunner *sr, char *fname); -/*! Does the SRunner have a log file? - \param sr The SRunner to test - \return True if logging, False otherwise +/* Does the SRunner have a log file? */ int srunner_has_log (SRunner *sr); -/*! Return the name of the log file, or NULL if none - \param sr The SRunner to query - \return The current log file, or NULL if not logging +/* Return the name of the log file, or NULL if none */ char *srunner_log_fname (SRunner *sr); -/*! @} */ +/* Control forking */ +enum fork_status { + CK_FORK, + CK_NOFORK +}; + +enum fork_status srunner_fork_status (SRunner *sr); +void srunner_set_fork_status (SRunner *sr, enum fork_status fstat); #ifdef __cplusplus -} +#define CK_CPPEND } +CL_CPPEND #endif #endif /* CHECK_H */ diff --git a/check/src/check_impl.h b/check/src/check_impl.h index 7b1e6ac..a0a7041 100644 --- a/check/src/check_impl.h +++ b/check/src/check_impl.h @@ -71,14 +71,14 @@ enum cl_event { CLEND_T }; -typedef void (*LFun) (SRunner *, FILE*, enum print_verbosity, +typedef void (*LFun) (SRunner *, FILE*, enum print_output, void *, enum cl_event); typedef struct Log { FILE *lfile; LFun lfun; int close; - enum print_verbosity mode; + enum print_output mode; } Log; struct SRunner { @@ -87,6 +87,7 @@ struct SRunner { List *resultlst; char *log_fname; List *loglst; + enum fork_status fstat; }; diff --git a/check/src/check_log.c b/check/src/check_log.c index 501c68c..f61ac6d 100644 --- a/check/src/check_log.c +++ b/check/src/check_log.c @@ -46,7 +46,7 @@ char *srunner_log_fname (SRunner *sr) } void srunner_register_lfun (SRunner *sr, FILE *lfile, int close, - LFun lfun, enum print_verbosity printmode) + LFun lfun, enum print_output printmode) { Log *l = emalloc (sizeof(Log)); l->lfile = lfile; @@ -95,7 +95,7 @@ static void srunner_send_evt (SRunner *sr, void *obj, enum cl_event evt) } } -void stdout_lfun (SRunner *sr, FILE *file, enum print_verbosity printmode, +void stdout_lfun (SRunner *sr, FILE *file, enum print_output printmode, void *obj, enum cl_event evt) { TestResult *tr; @@ -132,7 +132,7 @@ void stdout_lfun (SRunner *sr, FILE *file, enum print_verbosity printmode, } -void lfile_lfun (SRunner *sr, FILE *file, enum print_verbosity printmode, +void lfile_lfun (SRunner *sr, FILE *file, enum print_output printmode, void *obj, enum cl_event evt) { TestResult *tr; @@ -174,7 +174,7 @@ FILE *srunner_open_lfile (SRunner *sr) return f; } -void srunner_init_logging (SRunner *sr, enum print_verbosity print_mode) +void srunner_init_logging (SRunner *sr, enum print_output print_mode) { FILE *f; sr->loglst = list_create(); diff --git a/check/src/check_log.h b/check/src/check_log.h index a7205d7..8e2addf 100644 --- a/check/src/check_log.h +++ b/check/src/check_log.h @@ -7,17 +7,17 @@ void log_suite_start (SRunner *sr, Suite *s); void log_suite_end (SRunner *sr, Suite *s); void log_test_end (SRunner *sr, TestResult *tr); -void stdout_lfun (SRunner *sr, FILE *file, enum print_verbosity, +void stdout_lfun (SRunner *sr, FILE *file, enum print_output, void *obj, enum cl_event evt); -void lfile_lfun (SRunner *sr, FILE *file, enum print_verbosity, +void lfile_lfun (SRunner *sr, FILE *file, enum print_output, void *obj, enum cl_event evt); void srunner_register_lfun (SRunner *sr, FILE *lfile, int close, - LFun lfun, enum print_verbosity); + LFun lfun, enum print_output); FILE *srunner_open_lfile (SRunner *sr); -void srunner_init_logging (SRunner *sr, enum print_verbosity print_mode); +void srunner_init_logging (SRunner *sr, enum print_output print_mode); void srunner_end_logging (SRunner *sr); #endif /* CHECK_LOG_H */ diff --git a/check/src/check_print.c b/check/src/check_print.c index 5c3dc29..1bbaf60 100644 --- a/check/src/check_print.c +++ b/check/src/check_print.c @@ -26,22 +26,25 @@ #include "check_str.h" #include "check_print.h" -static void srunner_fprint_summary (FILE *file, SRunner *sr, int print_mode); -static void srunner_fprint_results (FILE *file, SRunner *sr, int print_mode); +static void srunner_fprint_summary (FILE *file, SRunner *sr, + enum print_output print_mode); +static void srunner_fprint_results (FILE *file, SRunner *sr, + enum print_output print_mode); -void srunner_print (SRunner *sr, int print_mode) +void srunner_print (SRunner *sr, enum print_output print_mode) { srunner_fprint (stdout, sr, print_mode); } -void srunner_fprint (FILE *file, SRunner *sr, int print_mode) +void srunner_fprint (FILE *file, SRunner *sr, enum print_output print_mode) { srunner_fprint_summary (file, sr, print_mode); srunner_fprint_results (file, sr, print_mode); } -static void srunner_fprint_summary (FILE *file, SRunner *sr, int print_mode) +static void srunner_fprint_summary (FILE *file, SRunner *sr, + enum print_output print_mode) { if (print_mode >= CRMINIMAL) { char *str; @@ -53,7 +56,8 @@ static void srunner_fprint_summary (FILE *file, SRunner *sr, int print_mode) return; } -static void srunner_fprint_results (FILE *file, SRunner *sr, int print_mode) +static void srunner_fprint_results (FILE *file, SRunner *sr, + enum print_output print_mode) { List *resultlst; @@ -66,7 +70,7 @@ static void srunner_fprint_results (FILE *file, SRunner *sr, int print_mode) return; } -void tr_fprint (FILE *file, TestResult *tr, int print_mode) +void tr_fprint (FILE *file, TestResult *tr, enum print_output print_mode) { if ((print_mode >= CRVERBOSE && tr->rtype == CRPASS) || (tr->rtype != CRPASS && print_mode >= CRNORMAL)) { diff --git a/check/src/check_print.h b/check/src/check_print.h index ee90905..43f14b5 100644 --- a/check/src/check_print.h +++ b/check/src/check_print.h @@ -20,8 +20,8 @@ #ifndef CHECK_PRINT_H #define CHECK_PRINT_H -void tr_fprint (FILE *file, TestResult *tr, int print_mode); -void srunner_fprint (FILE *file, SRunner *sr, int print_mode); +void tr_fprint (FILE *file, TestResult *tr, enum print_output print_mode); +void srunner_fprint (FILE *file, SRunner *sr, enum print_output print_mode); #endif /* CHECK_PRINT_H */ diff --git a/check/src/check_run.c b/check/src/check_run.c index 8da0704..dc93832 100644 --- a/check/src/check_run.c +++ b/check/src/check_run.c @@ -31,10 +31,10 @@ #include "check_log.h" -static void srunner_run_init (SRunner *sr, enum print_verbosity print_mode); -static void srunner_run_end (SRunner *sr, enum print_verbosity print_mode); +static void srunner_run_init (SRunner *sr, enum print_output print_mode); +static void srunner_run_end (SRunner *sr, enum print_output print_mode); static void srunner_iterate_suites (SRunner *sr, - enum print_verbosity print_mode); + enum print_output print_mode); static void srunner_run_tcase (SRunner *sr, TCase *tc); static void srunner_add_failure (SRunner *sr, TestResult *tf); static TestResult *tfun_run (char *tcname, TF *tf); @@ -58,6 +58,7 @@ SRunner *srunner_create (Suite *s) sr->resultlst = list_create(); sr->log_fname = NULL; sr->loglst = NULL; + sr->fstat = CK_FORK; return sr; } @@ -89,13 +90,13 @@ void srunner_free (SRunner *sr) free (sr); } -static void srunner_run_init (SRunner *sr, enum print_verbosity print_mode) +static void srunner_run_init (SRunner *sr, enum print_output print_mode) { srunner_init_logging (sr, print_mode); log_srunner_start (sr); } -static void srunner_run_end (SRunner *sr, enum print_verbosity print_mode) +static void srunner_run_end (SRunner *sr, enum print_output print_mode) { log_srunner_end (sr); @@ -103,7 +104,7 @@ static void srunner_run_end (SRunner *sr, enum print_verbosity print_mode) } static void srunner_iterate_suites (SRunner *sr, - enum print_verbosity print_mode) + enum print_output print_mode) { List *slst; @@ -126,7 +127,7 @@ static void srunner_iterate_suites (SRunner *sr, } } -void srunner_run_all (SRunner *sr, int print_mode) +void srunner_run_all (SRunner *sr, enum print_output print_mode) { if (sr == NULL) return; @@ -348,3 +349,14 @@ static int non_pass (int val) { return val == CRFAILURE || val == CRERROR; } + +enum fork_status srunner_fork_status (SRunner *sr) +{ + return sr->fstat; +} + +void srunner_set_fork_status (SRunner *sr, enum fork_status fstat) +{ + sr->fstat = fstat; +} + diff --git a/check/tests/Makefile.am b/check/tests/Makefile.am index ee22166..030315d 100644 --- a/check/tests/Makefile.am +++ b/check/tests/Makefile.am @@ -21,6 +21,7 @@ check_check_SOURCES= \ check_check_msg.c\ check_check_log.c\ check_check_limit.c\ + check_check_fork.c\ check_check_main.c check_stress_SOURCES=\ diff --git a/check/tests/Makefile.in b/check/tests/Makefile.in index 8220c2f..cb82805 100644 --- a/check/tests/Makefile.in +++ b/check/tests/Makefile.in @@ -75,7 +75,7 @@ noinst_PROGRAMS = check_check check_stress ex_output ex_log_output ex_setu EXTRA_DIST = test_output.sh test_log_output.sh -check_check_SOURCES = check_check.h check_list.c check_check_sub.c check_check_master.c check_check_msg.c check_check_log.c check_check_limit.c check_check_main.c +check_check_SOURCES = check_check.h check_list.c check_check_sub.c check_check_master.c check_check_msg.c check_check_log.c check_check_limit.c check_check_fork.c check_check_main.c check_stress_SOURCES = check_stress.c @@ -106,7 +106,7 @@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ check_check_OBJECTS = check_list.o check_check_sub.o \ check_check_master.o check_check_msg.o check_check_log.o \ -check_check_limit.o check_check_main.o +check_check_limit.o check_check_fork.o check_check_main.o check_check_LDADD = $(LDADD) check_check_DEPENDENCIES = ../src/libcheck.a check_check_LDFLAGS = @@ -137,11 +137,11 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best -DEP_FILES = .deps/check_check_limit.P .deps/check_check_log.P \ -.deps/check_check_main.P .deps/check_check_master.P \ -.deps/check_check_msg.P .deps/check_check_sub.P .deps/check_list.P \ -.deps/check_stress.P .deps/ex_log_output.P .deps/ex_output.P \ -.deps/ex_setup_output.P +DEP_FILES = .deps/check_check_fork.P .deps/check_check_limit.P \ +.deps/check_check_log.P .deps/check_check_main.P \ +.deps/check_check_master.P .deps/check_check_msg.P \ +.deps/check_check_sub.P .deps/check_list.P .deps/check_stress.P \ +.deps/ex_log_output.P .deps/ex_output.P .deps/ex_setup_output.P SOURCES = $(check_check_SOURCES) $(check_stress_SOURCES) $(ex_output_SOURCES) $(ex_log_output_SOURCES) $(ex_setup_output_SOURCES) OBJECTS = $(check_check_OBJECTS) $(check_stress_OBJECTS) $(ex_output_OBJECTS) $(ex_log_output_OBJECTS) $(ex_setup_output_OBJECTS) diff --git a/check/tests/check_check.h b/check/tests/check_check.h index 9ee2bdf..7005084 100644 --- a/check/tests/check_check.h +++ b/check/tests/check_check.h @@ -13,6 +13,6 @@ Suite *make_list_suite(void); Suite *make_msg_suite(void); Suite *make_log_suite(void); Suite *make_limit_suite(void); - +Suite *make_fork_suite(void); #endif /* CHECK_CHECK_H */ diff --git a/check/tests/check_check_main.c b/check/tests/check_check_main.c index 498c475..b651800 100644 --- a/check/tests/check_check_main.c +++ b/check/tests/check_check_main.c @@ -14,6 +14,7 @@ int main (void) srunner_add_suite(sr, make_msg_suite()); srunner_add_suite(sr, make_log_suite()); srunner_add_suite(sr, make_limit_suite()); + srunner_add_suite(sr, make_fork_suite()); setup(); printf ("Ran %d tests in subordinate suite\n", sub_nfailed); -- 2.49.0