head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.8 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.6 pkgsrc-2012Q4-base:1.2 pkgsrc-2011Q4:1.2.0.4 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q2:1.2.0.2 pkgsrc-2011Q2-base:1.2 pkgsrc-2010Q2:1.1.0.32 pkgsrc-2010Q2-base:1.1 pkgsrc-2010Q1:1.1.0.30 pkgsrc-2010Q1-base:1.1 pkgsrc-2009Q4:1.1.0.28 pkgsrc-2009Q4-base:1.1 pkgsrc-2009Q3:1.1.0.26 pkgsrc-2009Q3-base:1.1 pkgsrc-2009Q2:1.1.0.24 pkgsrc-2009Q2-base:1.1 pkgsrc-2009Q1:1.1.0.22 pkgsrc-2009Q1-base:1.1 pkgsrc-2008Q4:1.1.0.20 pkgsrc-2008Q4-base:1.1 pkgsrc-2008Q3:1.1.0.18 pkgsrc-2008Q3-base:1.1 cube-native-xorg:1.1.0.16 cube-native-xorg-base:1.1 pkgsrc-2008Q2:1.1.0.14 pkgsrc-2008Q2-base:1.1 cwrapper:1.1.0.12 pkgsrc-2008Q1:1.1.0.10 pkgsrc-2008Q1-base:1.1 pkgsrc-2007Q4:1.1.0.8 pkgsrc-2007Q4-base:1.1 pkgsrc-2007Q3:1.1.0.6 pkgsrc-2007Q3-base:1.1 pkgsrc-2007Q2:1.1.0.4 pkgsrc-2007Q2-base:1.1 pkgsrc-2007Q1:1.1.0.2 pkgsrc-2007Q1-base:1.1; locks; strict; comment @# @; 1.2 date 2010.08.18.04.36.13; author obache; state dead; branches; next 1.1; 1.1 date 2007.03.09.16.25.57; author rillig; state Exp; branches; next ; desc @@ 1.2 log @Update check to 0.9.8. Based on PR#43757 by Kamel Derouiche. Tue, Sep 22, 2009: Released Check 0.9.8 based on r559 (2009-09-23 21:00). * Fix CHECK_MICRO_VERSION, left at 6 in 0.9.7 by mistake. Tue, Sep 22, 2009: Released Check 0.9.7 based on r552 (2009-09-22 09:26). * Added CK_SUBUNIT support for outputting test information in the subunit wire protocol. See the check manual for more information. (Contributed by Robert Collins). * Added code and tests for timeout scaling via environment variable. Feature requested in tracker item #1549835 on sourceforge. * Added documentation for testing exit values with tcase_add_exit_test(). * Add make_macros perl script from somebody (who?) * add type to check_type error message * add contrib dir with xslt transform * function exist testing support (patch #1726574). * introduce HAVE_WORKING_SETENV to protect tc_timeout_env usage * support running tests with multiple pthreads (Daniel Gollub, closes 1391527) * partial MSYS/MinGW support Mon, Dec 29, 2008: Released Check 0.9.6 based on r453 (2008-12-01 22:14:15). * 'make distcheck' does not work out of the box. Disable the two top lines in doc/Makefile.am and it shall pass. Will have to be fixed later. * add call to AC_REPLACE_FUNCS([strsignal]) * add new rpl_strsignal following rpl_(re)malloc template, body of function due to Roland Illig -- hopefully closes 1629755 * add missing NULL argument to fail* varargs macro calls * define incorrect tests for __GNUC__ only -- both per Roland Illig in bug 1677391 * define CK_ATTRIBUTE_UNUSED for GCC >= 2.95, closing: [ 1674626 ] compile error with non defined __attribute__ compiler * Fixed error in documentation example Makefile.am, bug #1888237 * Fixed spelling (patch #1652630) * Handle NULL in srunner_add_suite(). Fixes #1624887 * add CK_FORK_GETENV to enum fork_status and delete CK_FORK_UNSPECIFIED * call strdup on result from strsignal to avoid clobbering it * add Torok Edwin to AUTHORS * add CK_TEST_RESULT_INVALID to enum test_result * add CK_CTX_INVALID to ck_result_ctx and don't use -1 anymore * count checks in setup() as well; patch due to Roland Stigge * use int __attribute__((unused)) _i instead of int _i __attribute__((unused)) per gcc-3.3.5 request from Sebastian Trahm * rename signal to _signal in _tcase_add_test to avoid a symbol clash with /usr/include/sys/signal.h on OS X. * define rpl_malloc and rpl_realloc for platforms where !malloc(0) and !realloc(0,0), such as AIX, because configure goes and redefines malloc/realloc in this case... * SVNChangeLog patch from Robert Collins * Incorporated patch from Debian for debian bug #395466. This fixes 'AM_PATH_CHECK causes "possibly undefined macro" errors'. * Added new Check fail API. Implemented on top of fail_unless. Future versions will reverse this so fail_unless is implemented on top of the ck_assert API. This API is not documented yet, will probably not be fully released until 0.9.8, when it will be possible to choose API. @ text @$NetBSD: patch-ae,v 1.1 2007/03/09 16:25:57 rillig Exp $ IRIX and HP/UX don't have strsignal. Too few arguments to varargs macro. --- tests/check_check_master.c.orig Fri Mar 9 11:11:41 2007 +++ tests/check_check_master.c Fri Mar 9 11:11:49 2007 @@@@ -86,6 +86,17 @@@@ static int nr_of_master_tests = sizeof master_tests /sizeof master_tests[0]; +#if defined(__sgi) +static const char * +strsignal(int sig) +{ + static char signame[40]; + + sprintf(signame, "SIG#%d", sig); + return signame; +} +#endif + START_TEST(test_check_nfailures) { int i; @@@@ -123,9 +134,9 @@@@ continue; } - fail_if(i - passed > sub_nfailed); + fail_if(i - passed > sub_nfailed, NULL); tr = tr_fail_array[i - passed]; - fail_unless(tr != NULL); + fail_unless(tr != NULL, NULL); got_msg = tr_msg(tr); expected_msg = master_tests[i].msg; if (strcmp(got_msg, expected_msg) != 0) { @@@@ -152,9 +163,9 @@@@ continue; } - fail_if(i - passed > sub_nfailed); + fail_if(i - passed > sub_nfailed, NULL); tr = tr_fail_array[i - passed]; - fail_unless(tr != NULL); + fail_unless(tr != NULL, NULL); line_no = master_tests[i].line_nos; if (line_no > 0 && tr_lno(tr) != line_no) { char *emsg = malloc(MAXSTR); @@@@ -179,9 +190,9 @@@@ continue; } - fail_if(i - passed > sub_nfailed); + fail_if(i - passed > sub_nfailed, NULL); tr = tr_fail_array[i - passed]; - fail_unless(tr != NULL); + fail_unless(tr != NULL, NULL); fail_unless(master_tests[i].failure_type == tr_rtype(tr), "Failure type wrong for test %d", i); } @@@@ -193,7 +204,7 @@@@ int i; for (i = 0; i < sub_nfailed; i++) { TestResult *tr = tr_fail_array[i]; - fail_unless(tr != NULL); + fail_unless(tr != NULL, NULL); fail_unless(tr_lfile(tr) != NULL, "Bad file name for test %d", i); fail_unless(strstr(tr_lfile(tr), "check_check_sub.c") != 0, "Bad file name for test %d", i); @ 1.1 log @Portability fixes for IRIX with MIPSpro. @ text @d1 1 a1 1 $NetBSD$ @