--- check-0.9.5.orig/check.m4 +++ check-0.9.5/check.m4 @@ -4,8 +4,8 @@ AC_DEFUN([AM_PATH_CHECK], [ - AC_MSG_WARN([[AM_PATH_CHECK() is deprecated]]) - AC_MSG_WARN([[use PKG_CHECK_MODULES([CHECK], [check >= 0.9.4]) instead]]) + AC_MSG_WARN([A@&t@M_PATH_CHECK() is deprecated]) + AC_MSG_WARN([[use P@&t@KG_CHECK_MODULES([CHECK], [check >= 0.9.4]) instead]]) AC_ARG_WITH([check], [ --with-check=PATH prefix where check is installed [default=auto]]) --- check-0.9.5.orig/debian/rules +++ check-0.9.5/debian/rules @@ -0,0 +1,85 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +export DESTDIR=$(shell pwd)/debian/check + +configure: configure-stamp +configure-stamp: + dh_testdir + ./configure --prefix=/usr --infodir=/usr/share/info --enable-plain-docdir + touch configure-stamp + +configure-pic: configure-stamp-pic +configure-stamp-pic: + dh_testdir + CFLAGS="-g -O2 -fPIC" ./configure --prefix=/usr --infodir=/usr/share/info \ + --enable-plain-docdir + touch configure-stamp-pic + +build: build-pic configure-stamp build-stamp +build-stamp: + dh_testdir + $(MAKE) + touch build-stamp + +build-pic: configure-stamp-pic build-stamp-pic +build-stamp-pic: + dh_testdir + $(MAKE) + mv src/.libs/libcheck.a src/libcheck_pic.a + touch build-stamp-pic + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp build-stamp-pic configure-stamp-pic + [ ! -f Makefile ] || $(MAKE) distclean + rm -f src/libcheck_pic.a + # hack! + rm -f debian/files + dh_clean + +install: build + dh_testdir + dh_testroot + dh_installdirs + + $(MAKE) DESTDIR=$(DESTDIR) install + # fix the installation + rm -f debian/check/usr/share/doc/check/COPYING* + +install-pic: build-pic + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + cp src/libcheck_pic.a debian/check/usr/lib/ + +binary-arch: install-pic install + dh_testdir + dh_testroot + dh_installdocs -XTODO + dh_installinfo doc/check.info + dh_installexamples + dh_installchangelogs ChangeLog + dh_compress -XMakefile + # fix the setup + rm -f debian/check/usr/share/doc/check/ChangeLog.gz + rm -f debian/check/usr/lib/libcheck.so.* + rm -f debian/check/usr/lib/libcheck.so + rm -f debian/check/usr/lib/libcheck.la + dh_link + dh_strip + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-indep: + # nothing to do + +binary: binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- check-0.9.5.orig/debian/check.files +++ check-0.9.5/debian/check.files @@ -0,0 +1,5 @@ +usr/include/check.h +usr/lib/libcheck.a +usr/share/aclocal/check.m4 +usr/share/doc/check +usr/lib/pkgconfig/check.pc --- check-0.9.5.orig/debian/dirs +++ check-0.9.5/debian/dirs @@ -0,0 +1,3 @@ +/usr/share/doc/check +/usr/include +/usr/lib --- check-0.9.5.orig/debian/examples +++ check-0.9.5/debian/examples @@ -0,0 +1 @@ +doc/money/* --- check-0.9.5.orig/debian/control +++ check-0.9.5/debian/control @@ -0,0 +1,17 @@ +Source: check +Section: devel +Priority: optional +Maintainer: Robert Lemmen +Build-Depends: debhelper (>> 4.0.0) +Build-Conflicts: texinfo +Standards-Version: 3.8.0 + +Package: check +Architecture: any +Homepage: http://check.sourceforge.net/ +Description: unit test framework for C + Check 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. --- check-0.9.5.orig/debian/example_makefile +++ check-0.9.5/debian/example_makefile @@ -0,0 +1,11 @@ +# this is a very simple makefile for the +# check examples. in a real-world situation +# you would have to modify your make setup accordingly. + +LDFLAGS=-lcheck + +check_example: check_money.o money.o + $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) + +%.o: %.c + $(CC) $(CFLAGS) -c $< --- check-0.9.5.orig/debian/docs +++ check-0.9.5/debian/docs @@ -0,0 +1,2 @@ +NEWS +ChangeLogOld --- check-0.9.5.orig/debian/changelog +++ check-0.9.5/debian/changelog @@ -0,0 +1,160 @@ +check (0.9.5-4) unstable; urgency=low + + * Added patch by Roland Stigge (closes: #468309) + * Bumped standards version + * Added Homepage field + + -- Robert Lemmen Sun, 15 Jun 2008 19:04:43 +0100 + +check (0.9.5-3) unstable; urgency=low + + * Build-Conflicts with texinfo (closes: #44637) + * New watch file (closes: #449742) + + -- Robert Lemmen Fri, 7 Dec 2007 12:52:06 +0100 + +check (0.9.5-2) unstable; urgency=low + + * Fixes clean target in debian/rules + * Fixes info file (closes: #440739, #440798) + + -- Robert Lemmen Tue, 4 Sep 2007 15:00:48 +0200 + +check (0.9.5-1) unstable; urgency=low + + * New upstream release + + -- Robert Lemmen Tue, 28 Aug 2007 12:14:42 +0200 + +check (0.9.4-4) unstable; urgency=low + + * use dh_installinfo (closes: #410781) + + -- Robert Lemmen Tue, 10 Apr 2007 23:16:43 +0200 + +check (0.9.4-3) unstable; urgency=low + + * Fixed a bug that breaks all loop tests that use "i" as a variable name + (closes: #404118) + + -- Robert Lemmen Thu, 21 Dec 2006 21:03:44 +0100 + +check (0.9.4-2) unstable; urgency=low + + * Fixed check.m4, thanks josh! (closes: #395466, #395467) + * Added binary-indep target (closes: #395677) + + -- Robert Lemmen Mon, 30 Oct 2006 11:19:36 +0100 + +check (0.9.4-1) unstable; urgency=low + + * New upstream release + + -- Robert Lemmen Sun, 15 Oct 2006 14:21:41 +0200 + +check (0.9.3-2) unstable; urgency=low + + * Also ships a PIC library (closes: #344309) + + -- Robert Lemmen Thu, 22 Dec 2005 10:47:07 +0100 + +check (0.9.3-1) unstable; urgency=low + + * New upstream release including many fixes about threading and forking + functionality + * Some spurious files were removed in the debian/ dir (closes: #195607) + + -- Robert Lemmen Tue, 30 Aug 2005 12:06:32 +0200 + +check (0.9.2-6) unstable; urgency=low + + * Rebuild for g++ transition + * Updated to newer standards version + + -- Robert Lemmen Tue, 19 Jul 2005 10:53:23 +0200 + +check (0.9.2-5) unstable; urgency=low + + * fixed documentation (Closes: #301214) + * added include to check.h (Closes: #301319) + + -- Robert Lemmen Wed, 8 Jun 2005 14:50:11 +0200 + +check (0.9.2-4) unstable; urgency=low + + * added an upgrade notice that was missing + + -- Robert Lemmen Mon, 14 Mar 2005 19:12:09 +0100 + +check (0.9.2-3) unstable; urgency=low + + * fixed some problems with upstream files in debian/ + + -- Robert Lemmen Tue, 15 Feb 2005 16:11:59 +0100 + +check (0.9.2-2) unstable; urgency=low + + * fixed FTBFS error when trying to copy the example data + + -- Robert Lemmen Thu, 13 Jan 2005 13:46:25 +0100 + +check (0.9.2-1) unstable; urgency=low + + * New upstream release (Closes: #261420) + * Took over maintenance (Closes: #288213) + * Updated to new policy version + * Fixed copyright files (Closes: #187986) + * General cleanups in debian/ + * Added watch file + + -- Robert Lemmen Sat, 8 Jan 2005 20:22:17 +0100 + +check (0.8.4-1) unstable; urgency=low + + * Changed Author(s): to Author: in copyright file to keep lintian + happy. + + * debian/rules now uses upstream configure, DH_COMPAT=4, install + target is simplified by additional use of debhelper, irrelevant + dh_ program calls commented out. + + * New upstream release. Closes: bug#85195. + + -- Britton Leo Kerin Sun, 08 Dec 2002 23:53:02 -0900 + +check (0.8.3-2) unstable; urgency=low + + * Corrected typos in check.h. closes: #151599 + + -- Muhammad Hussain Yusuf Mon, 1 Jul 2002 16:21:57 +0100 + +check (0.8.3-1) unstable; urgency=low + + * New Upstream release + * Added check.m4 to /usr/share/aclocal. Closes: #148044 + + -- Muhammad Hussain Yusuf Sat, 25 May 2002 10:59:11 +0100 + +check (0.8.2-1) unstable; urgency=low + + * New Upstream Release. Closes: #144186 + + -- Muhammad Hussain Yusuf Fri, 26 Apr 2002 10:54:45 +0100 + +check (0.8.1-2) unstable; urgency=low + + * Changed copyright details to LGPL. Closes: #141952 + + -- Muhammad Hussain Yusuf Wed, 10 Apr 2002 12:55:49 +0100 + +check (0.8.1-1) unstable; urgency=low + + * New Upstream Release. Closes: #138898 + + -- Muhammad Hussain Yusuf Fri, 22 Mar 2002 12:41:16 +0000 + +check (0.8.0-1) unstable; urgency=low + + * Initial Release. Closes: #132568 + + -- Muhammad Hussain Yusuf Sun, 10 Feb 2002 15:55:59 +0000 --- check-0.9.5.orig/debian/compat +++ check-0.9.5/debian/compat @@ -0,0 +1 @@ +4 --- check-0.9.5.orig/debian/README.Debian +++ check-0.9.5/debian/README.Debian @@ -0,0 +1,23 @@ +P I C S U P P O R T +===================== + +In addition to the non-PIC static library, check now also ships a PIC- +enabled library libcheck_pic.a, this is e.g. needed if you want to link +libcheck against a dynamic library on x86_64 + +U P G R A D E N O T I C E +=========================== + +This version of check makes tcase_free and suite_free static and not +available to your programs anymore. this is not an error, but intended +since these are freed by srunner_free now. a deprecation period would +have been nice, but here we are. so: just delete the calls and make +sure you run srunner_free! + +D O C U M E N T A T I O N +========================= + +In this version of check, all relevant documentation is in texinfo format, so +just type "info check" to get to the manual. + +cu robert --- check-0.9.5.orig/debian/check.dirs +++ check-0.9.5/debian/check.dirs @@ -0,0 +1,5 @@ +usr/lib +usr/lib/pkgconfig +usr/include +usr/share/aclocal +usr/share/doc/check --- check-0.9.5.orig/debian/watch +++ check-0.9.5/debian/watch @@ -0,0 +1,6 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# Site Directory Pattern Version Script +version=2 +http://sf.net/check/check-(.*).tar.gz --- check-0.9.5.orig/debian/copyright +++ check-0.9.5/debian/copyright @@ -0,0 +1,31 @@ +This package is now maintained by Robert Lemmen + +It was originally debianized by Muhammad Hussain Yusuf +on Sun, 10 Feb 2002 15:55:59 +0000 and maintained after him for a while by +Britton Leo Kerin + +The upstream source was downloaded from http://sourceforge.net/projects/check + +Upstream Authors: Arien Malec , + Sven Neumann , + Fred L. Drake, Jr. + +Copyright: 2001-2005 check authors (see above) and others + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, + USA. + + On Debian systems, the complete text of the GNU Lesser General Public + License can be found in /usr/share/common-licenses/LGPL. --- check-0.9.5.orig/doc/check.texi +++ check-0.9.5/doc/check.texi @@ -8,6 +8,11 @@ @syncodeindex vr cp @c %**end of header +@dircategory Development +@direntry +* Check: (check)Introduction. +@end direntry + @copying This manual is for Check (version @value{VERSION}, @value{UPDATED}), @@ -26,11 +31,6 @@ @end quotation @end copying -@dircategory Software development -@direntry -* Check: (check)Introduction. -@end direntry - @titlepage @title Check @subtitle A Unit Test Framework for C --- check-0.9.5.orig/doc/check.info +++ check-0.9.5/doc/check.info @@ -1,5 +1,10 @@ This is check.info, produced by makeinfo version 4.7 from check.texi. +INFO-DIR-SECTION Development +START-INFO-DIR-ENTRY +* Check: (check). Introduction +END-INFO-DIR-ENTRY + This manual is for Check (version 0.9.5, 21 November 2006), a unit test framework for C programs. @@ -13,11 +18,6 @@ no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License." -INFO-DIR-SECTION Software development -START-INFO-DIR-ENTRY -* Check: (check)Introduction. -END-INFO-DIR-ENTRY -  File: check.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) --- check-0.9.5.orig/doc/example/src/money.1.c +++ check-0.9.5/doc/example/src/money.1.c @@ -0,0 +1 @@ +#include "money.1.h" --- check-0.9.5.orig/tests/check_check_fixture.c +++ check-0.9.5/tests/check_check_fixture.c @@ -41,7 +41,7 @@ nrun = srunner_ntests_run(fixture_sr); nfail = srunner_ntests_failed(fixture_sr); - fail_unless (nrun == 0 && nfail == 1, + fail_unless (nrun == 1 && nfail == 1, "Counts for run and fail for fixture failure not correct"); } END_TEST @@ -49,7 +49,7 @@ START_TEST(test_print_counts) { char *srstat = sr_stat_str(fixture_sr); - const char *exp = "0%: Checks: 0, Failures: 1, Errors: 0"; + const char *exp = "0%: Checks: 1, Failures: 1, Errors: 0"; fail_unless(strcmp(srstat, exp) == 0, "SRunner stat string incorrect with setup failure"); @@ -172,7 +172,7 @@ sr = srunner_create(s); srunner_run_all(sr,CK_VERBOSE); - fail_unless (srunner_ntests_run(sr) == 0, + fail_unless (srunner_ntests_run(sr) == 1, "Test run counts not correct for checked setup failure"); fail_unless (srunner_ntests_failed(sr) == 1, "Failure counts not correct for checked setup failure"); @@ -180,7 +180,7 @@ strstat= sr_stat_str(sr); fail_unless(strcmp(strstat, - "0%: Checks: 0, Failures: 1, Errors: 0") == 0, + "0%: Checks: 1, Failures: 1, Errors: 0") == 0, "SRunner stat string incorrect with checked setup failure"); @@ -212,7 +212,7 @@ srunner_set_fork_status(sr, CK_NOFORK); srunner_run_all(sr, CK_VERBOSE); - fail_unless (srunner_ntests_run(sr) == 0, + fail_unless (srunner_ntests_run(sr) == 1, "Test run counts not correct for checked setup failure"); fail_unless (srunner_ntests_failed(sr) == 1, "Failure counts not correct for checked setup failure"); @@ -235,7 +235,7 @@ srunner_set_fork_status(sr, CK_NOFORK); srunner_run_all(sr, CK_VERBOSE); - fail_unless (srunner_ntests_run(sr) == 0, + fail_unless (srunner_ntests_run(sr) == 1, "Test run counts not correct for checked setup failure"); fail_unless (srunner_ntests_failed(sr) == 1, "Failure counts not correct for checked setup failure"); @@ -288,13 +288,13 @@ fail_unless (srunner_ntests_failed(sr) == 1, "Failure counts not correct for checked setup signal"); - fail_unless (srunner_ntests_run(sr) == 0, + fail_unless (srunner_ntests_run(sr) == 1, "Test run counts not correct for checked setup signal"); strstat= sr_stat_str(sr); fail_unless(strcmp(strstat, - "0%: Checks: 0, Failures: 0, Errors: 1") == 0, + "0%: Checks: 1, Failures: 0, Errors: 1") == 0, "SRunner stat string incorrect with checked setup signal"); --- check-0.9.5.orig/src/check_run.c +++ check-0.9.5/src/check_run.c @@ -163,9 +163,7 @@ static void srunner_add_failure (SRunner *sr, TestResult *tr) { list_add_end (sr->resultlst, tr); - /* If the context is either of these, the test has run. */ - if ((tr->ctx == CK_CTX_TEST) || (tr->ctx == CK_CTX_TEARDOWN)) - sr->stats->n_checked++; + sr->stats->n_checked++; /* count checks during setup, test, and teardown */ if (tr->rtype == CK_FAILURE) sr->stats->n_failed++; else if (tr->rtype == CK_ERROR)