]> granicus.if.org Git - check/log
check
10 years agoCase void* to goal container after using Check's lists
brarcher [Mon, 23 Jun 2014 04:13:21 +0000 (04:13 +0000)]
Case void* to goal container after using Check's lists

These changes were necessary to get Check to compile with
a c++ compiler.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1157 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoCase void* to goal container after emalloc()
brarcher [Mon, 23 Jun 2014 04:13:18 +0000 (04:13 +0000)]
Case void* to goal container after emalloc()

These changes were necessary to get Check to compile with
a c++ compiler.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1156 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoAllow checked fixtures when compiled without fork().
brarcher [Mon, 23 Jun 2014 04:13:16 +0000 (04:13 +0000)]
Allow checked fixtures when compiled without fork().

Previously such setup/teardown functions were disabled, as the
full contract for checked fixtures could not be honored. Checked
fixtures in CK_NOFORK mode are now closer to the contract, and are
now enabled.

Besides, it was possible to use checked fixtures if the system
had fork() but the tests were configured to run in CK_NOFORK mode.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1155 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUse US_PER_SEC instead of magic number
brarcher [Mon, 23 Jun 2014 04:13:13 +0000 (04:13 +0000)]
Use US_PER_SEC instead of magic number

Patch provided by Michael Piszczek

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1154 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoAdd DurationMsg to CheckMsg union
brarcher [Mon, 23 Jun 2014 04:13:11 +0000 (04:13 +0000)]
Add DurationMsg to CheckMsg union

As the CheckMsg union is passed around to the various
pack/upack functions, and a DurationMsg is valid to be
passed around, include it in the union just in case
the DurationMsg is or becomes larger than the other
members.

Patch provided by Michael Piszczek

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1153 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoInitialize buf before use
brarcher [Mon, 23 Jun 2014 04:13:09 +0000 (04:13 +0000)]
Initialize buf before use

Patch provided by Michael Piszczek

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1152 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoRemove unused declaration
brarcher [Mon, 23 Jun 2014 04:13:06 +0000 (04:13 +0000)]
Remove unused declaration

Patch provided by Michael Piszczek

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1151 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoFix checked teardown calls going into infinate loop in CK_NOFORK mode
brarcher [Mon, 23 Jun 2014 04:13:03 +0000 (04:13 +0000)]
Fix checked teardown calls going into infinate loop in CK_NOFORK mode

A test can be created with a checked teardown, where the teardown
would call some Check asserts. If the test was run in CK_NOFORK
mode and one of the asserts in the teardown failed, longjmp()
would be called, which would result in the setjmp() being returned
to which monitored the test function, and the checked teardowns
executed again. This lead to an infinate loop.

The fix* for this is to execute the checked teardowns in their
own setjmp() block. A test is added to ensure that CK_NOFORK
with a failed checked teardown does not go into an infinate loop.

In addition, the comments for the checked and unchecked
fixture API are updated to be more clear as to what occurs
for CK_FORK and CK_NOFORK mode.

* This reveals another problem: a failed checked teardown
reacts differently for CK_FORK and CK_NOFORK mode.

CK_FORK: the test is marked as failed
CK_NOFORK: the test is marked as passed

More work will need to be done to allow CK_NOFORK mode to also
cause a test to fail if the checked teardown fails.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1150 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoCombine checked and unchecked setup handling
brarcher [Mon, 23 Jun 2014 04:13:00 +0000 (04:13 +0000)]
Combine checked and unchecked setup handling

The code for checked and unchecked was very similar, and
was combined to simplify things.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1149 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoFix spacing
brarcher [Mon, 23 Jun 2014 04:12:58 +0000 (04:12 +0000)]
Fix spacing

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1148 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautotools: change check for floor() and __floor()
brarcher [Mon, 23 Jun 2014 04:12:55 +0000 (04:12 +0000)]
autotools: change check for floor() and __floor()

The reason AIX is having difficulty with floor() is that the
   AC_CHECK_LIB([m], [floor])
finds floor() in libm, however due to some header file stuff
(maybe) floor() cannot be used directly. Instead, there is likely
a definition for __floor() -> floor().

To check for this, floor() is detected in libm as normal. After,
determine if floor() can be used directly. If not, check if __floor()
is defined (not necessarily a function). If floor() is usable, do
that. If not but __floor() is available, try using that.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1147 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUpdate AUTHORS file
brarcher [Mon, 23 Jun 2014 04:12:53 +0000 (04:12 +0000)]
Update AUTHORS file

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1146 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUse env to find shell to use
brarcher [Thu, 19 Jun 2014 01:53:32 +0000 (01:53 +0000)]
Use env to find shell to use

On at least one platform (Solaris), the shell located at /bin/sh is
not a compliant shell. Using env as a form of redirection to find
a sh program, the PATH can be changed to find a compliant sh
to use. On platforms where /bin/sh is compliant, env should work
just fine.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1145 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautotools: fix floor() check
brarcher [Thu, 19 Jun 2014 01:53:30 +0000 (01:53 +0000)]
autotools: fix floor() check

The floor check did not work properly on Solaris.

The check yields this in config.h:

   #define HAVE_FLOOR $HAVE_FLOOR

which results in the following build failure:

   "libcompat.h", line 127: token not allowed in directive: $

This fix is provided by Georg Sauthoff.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1144 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautotools: include flag for AIX only if on AIX
brarcher [Sun, 15 Jun 2014 23:15:10 +0000 (23:15 +0000)]
autotools: include flag for AIX only if on AIX

Also, correcting comment about this being for Solaris.
It is for AIX instead.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1143 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautoconf: attempt to find __floor() if floor() is unavailable
brarcher [Sun, 15 Jun 2014 23:15:07 +0000 (23:15 +0000)]
autoconf: attempt to find __floor() if floor() is unavailable

On the AIX platform, floor() is not in libm, but
__floor() is an internal function in the compiler.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1142 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoRestore development header in NEWS
brarcher [Sat, 31 May 2014 00:45:48 +0000 (00:45 +0000)]
Restore development header in NEWS

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1141 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUpdate for release
brarcher [Sat, 31 May 2014 00:45:45 +0000 (00:45 +0000)]
Update for release

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1140 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUpdate for release
brarcher [Sat, 31 May 2014 00:09:01 +0000 (00:09 +0000)]
Update for release

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1138 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautoconf: add cflag for Solaris to enable c99 features
brarcher [Mon, 26 May 2014 21:03:09 +0000 (21:03 +0000)]
autoconf: add cflag for Solaris to enable c99 features

Without this flag, Solaris will fail to compile in check.h when
it hits the variable macros.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1137 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agochange first arg of timer_create to clockid_t
brarcher [Mon, 26 May 2014 21:03:06 +0000 (21:03 +0000)]
change first arg of timer_create to clockid_t

The clock id argument should have been of type
clockid_t.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1136 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoonly declare atexit() test if fork is available
brarcher [Wed, 21 May 2014 12:07:44 +0000 (12:07 +0000)]
only declare atexit() test if fork is available

The test is already disabled if fork is disabled.
No need to compile the code.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1135 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agouse atexit() instead of on_exit() for test
brarcher [Wed, 21 May 2014 03:28:07 +0000 (03:28 +0000)]
use atexit() instead of on_exit() for test

atexit() is POSIX, whereas on_exit() is not.
Specifically, on_exit() does not exist on
OpenBSD (and perhaps other platforms)

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1134 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUse env to find shell to use
brarcher [Mon, 12 May 2014 01:38:24 +0000 (01:38 +0000)]
Use env to find shell to use

On at least one platform (Solaris), the shell located at /bin/sh is
not a compliant shell. Using env as a form of redirection to find
a sh program, the PATH can be changed to find a compliant sh
to use. On platforms where /bin/sh is compliant, env should work
just fine.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1133 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoremove warnings about prototypes
brarcher [Fri, 9 May 2014 12:48:05 +0000 (12:48 +0000)]
remove warnings about prototypes

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1132 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautotools: find compliant sed to use
brarcher [Fri, 9 May 2014 12:41:02 +0000 (12:41 +0000)]
autotools: find compliant sed to use

On Solaris the default sed program in the PATH may not work
very well. Attempt to find a better one with the AC_PROG_SED macro

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1131 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUpdate AUTHORS file
brarcher [Fri, 9 May 2014 12:41:00 +0000 (12:41 +0000)]
Update AUTHORS file

For the changes that Georg is helping with

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1130 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoadd comment about not using -pedantic flag due to solaris issue
brarcher [Wed, 7 May 2014 11:03:17 +0000 (11:03 +0000)]
add comment about not using -pedantic flag due to solaris issue

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1129 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoupon test failure, invoke _exit() instead of exit()
brarcher [Wed, 7 May 2014 10:59:33 +0000 (10:59 +0000)]
upon test failure, invoke _exit() instead of exit()

exit() will call atexit handlers, which may try to
clean up things or wait for things to get cleaned up,
which we don't want or need. We just want to stop
and let the parent know about the failure as quickly
as possible in case fork() is used.

Fixes timeouts on assert failures in checks where
an exit handler waits for things to stop, but they
don't stop because they haven't been shut down,
and they haven't been shut down because there's no
simple way to do so on failures.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1128 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUpdate NEWS with bug#96 fix
brarcher [Wed, 7 May 2014 01:37:11 +0000 (01:37 +0000)]
Update NEWS with bug#96 fix

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1127 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agofix formatting for ck_assert_(u)int_* calls if using % operator
brarcher [Wed, 7 May 2014 01:32:50 +0000 (01:32 +0000)]
fix formatting for ck_assert_(u)int_* calls if using % operator

If an expression is used in any of the ck_assert_(u)int_* calls
that uses the % operator, for example:

ck_assert_int_eq(fs.write.slot % fs.slots_per_sector, i+1);

the result was the "% f" would be interpreted as a format string.

This fix prevents the issue by passing the entire expression as a
string, and feeding the underlying printf a "%s" argument instead.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1126 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years ago* add LT_INIT to configure.ac to build .la files
cpickett [Mon, 7 Apr 2014 16:16:46 +0000 (16:16 +0000)]
* add LT_INIT to configure.ac to build .la files

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1125 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: use pkg-config to find check
brarcher [Wed, 5 Mar 2014 02:19:32 +0000 (02:19 +0000)]
example: use pkg-config to find check

Moving away from the deprecated AM_PATH_CHECK to the
not-deprecated PKG_CHECK_MODULES

Based on patch submitted by Julien Godin

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1124 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoinclude signal.h in exit tests
brarcher [Wed, 19 Feb 2014 02:39:54 +0000 (02:39 +0000)]
include signal.h in exit tests

technically this should have been here before. However, the
autotools build did not need it, so it was not caught.
The CMake build requires it be in place to get the definition
of the SIGSEGV signal.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1123 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoadd test for tcase_add_loop_test_raise_signal
brarcher [Mon, 17 Feb 2014 12:07:52 +0000 (12:07 +0000)]
add test for tcase_add_loop_test_raise_signal

There was originally no test for this

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1122 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agofix spelling issue in test
brarcher [Sun, 16 Feb 2014 16:22:40 +0000 (16:22 +0000)]
fix spelling issue in test

The code changed 'occured' -> 'occurred', but the tests needed
to be changed as well.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1121 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agospacing
brarcher [Sun, 16 Feb 2014 05:20:41 +0000 (05:20 +0000)]
spacing

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1120 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoremove @since tag from fork_status enum
brarcher [Sun, 16 Feb 2014 05:20:39 +0000 (05:20 +0000)]
remove @since tag from fork_status enum

The intention was to have the @since tags on the
functions instead.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1119 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoMaking doxygen API page is now part of the release
brarcher [Sun, 16 Feb 2014 04:59:03 +0000 (04:59 +0000)]
Making doxygen API page is now part of the release

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1118 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoweb: reference new API page
brarcher [Sun, 16 Feb 2014 04:59:01 +0000 (04:59 +0000)]
web: reference new API page

The API page is Doxygen documentation refering to Check's
API in check.h

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1117 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodoc: include doxygen config used to create API web page
brarcher [Sun, 16 Feb 2014 04:59:00 +0000 (04:59 +0000)]
doc: include doxygen config used to create API web page

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1116 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoFix a few spelling issues in check.h.in
brarcher [Sun, 16 Feb 2014 04:58:57 +0000 (04:58 +0000)]
Fix a few spelling issues in check.h.in

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1115 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoRemove documentation at top of check.h.in
brarcher [Sun, 16 Feb 2014 04:58:55 +0000 (04:58 +0000)]
Remove documentation at top of check.h.in

This documentation is captured better in other places, including
Check's documentation and examples.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1114 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoMake check.h.in Doxygen friendly
brarcher [Sun, 16 Feb 2014 04:58:52 +0000 (04:58 +0000)]
Make check.h.in Doxygen friendly

All prototypes and enums are now documented using javadoc.
Doxygen is able to convert this file into a web page displaying
Check's API. This will be used on Check's web page to display
what API is available and when it was introduced.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1113 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoconfigure.ac: add comment regarding not using -ansi
brarcher [Fri, 14 Feb 2014 10:59:03 +0000 (10:59 +0000)]
configure.ac: add comment regarding not using -ansi

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1112 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoconfigure.ac: print summary at end of configure
brarcher [Fri, 14 Feb 2014 10:59:00 +0000 (10:59 +0000)]
configure.ac: print summary at end of configure

The reason for the summary is mostly for convenience, when
trying Check out on different platforms.

This includes most of the possible configurable options.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1111 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodoc: add info on using Valgrind to find memory leaks
brarcher [Sat, 8 Feb 2014 07:01:42 +0000 (07:01 +0000)]
doc: add info on using Valgrind to find memory leaks

This was prompted from a discussion on Check's user mailing
list.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1110 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodoc: fix a few spelling mistakes
brarcher [Sat, 8 Feb 2014 07:01:35 +0000 (07:01 +0000)]
doc: fix a few spelling mistakes

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1109 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoweb: mention logging formats in Check description
brarcher [Sat, 8 Feb 2014 07:01:30 +0000 (07:01 +0000)]
web: mention logging formats in Check description

For some people, the logging format (e.g. TAP) is also important
to know.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1108 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoNEWS: Mention example now works with CMake
brarcher [Wed, 5 Feb 2014 16:08:57 +0000 (16:08 +0000)]
NEWS: Mention example now works with CMake

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1107 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoNEWS: mention fix for check_stdint.h for CMake builds
brarcher [Wed, 5 Feb 2014 16:08:53 +0000 (16:08 +0000)]
NEWS: mention fix for check_stdint.h for CMake builds

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1106 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoNEWS: Indent last entry
brarcher [Wed, 5 Feb 2014 16:08:50 +0000 (16:08 +0000)]
NEWS: Indent last entry

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1105 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: Mention that was tested on Windows 7 with CMake
brarcher [Wed, 5 Feb 2014 16:08:44 +0000 (16:08 +0000)]
example: Mention that was tested on Windows 7 with CMake

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1104 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: add info on config.h.in, which is part of the CMake example
brarcher [Wed, 5 Feb 2014 16:08:40 +0000 (16:08 +0000)]
example: add info on config.h.in, which is part of the CMake example

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1103 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: update docs to mention CHECK_INSTALL_DIR var
brarcher [Wed, 5 Feb 2014 16:08:36 +0000 (16:08 +0000)]
example: update docs to mention CHECK_INSTALL_DIR var

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1102 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoremove trailing white space
brarcher [Wed, 5 Feb 2014 16:08:31 +0000 (16:08 +0000)]
remove trailing white space

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1101 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: declare variables at top, for MSVC
brarcher [Wed, 5 Feb 2014 16:08:26 +0000 (16:08 +0000)]
example: declare variables at top, for MSVC

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1100 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: include stdint.h
brarcher [Wed, 5 Feb 2014 16:08:21 +0000 (16:08 +0000)]
example: include stdint.h

Without this, the intmax_t and uintmax_t definitions will not
be available on MSVC

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1099 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: include config.h
brarcher [Wed, 5 Feb 2014 16:08:15 +0000 (16:08 +0000)]
example: include config.h

Without it, the pid_t definition will be missed, which is needed
by check.h

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1098 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: add note about CHECK_INSTALL_DIR
brarcher [Wed, 5 Feb 2014 16:08:10 +0000 (16:08 +0000)]
example: add note about CHECK_INSTALL_DIR

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1097 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: provide intmax_t and uintmax_t if missing
brarcher [Wed, 5 Feb 2014 16:08:05 +0000 (16:08 +0000)]
example: provide intmax_t and uintmax_t if missing

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1096 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: Add CHECK_INSTALL_DIR override for FindCheck.cmake
brarcher [Wed, 5 Feb 2014 16:08:00 +0000 (16:08 +0000)]
example: Add CHECK_INSTALL_DIR override for FindCheck.cmake

If pkg-config is not installed on the system, then the
FindCheck.cmake script may fail. This is especially likely
on Windows. In this case, we expect that the variable
CHECK_INSTALL_DIR points to the install location of Check.

If this variable is not defined, then the find_path() and
find_library() functions will try to locate Check the
best that it can.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1095 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agocmake: install the check_stdint.h header
brarcher [Wed, 5 Feb 2014 16:07:55 +0000 (16:07 +0000)]
cmake: install the check_stdint.h header

This header is needed by check.h, but was not installed.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1094 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodoc: fix typo in check.texi
brarcher [Tue, 4 Feb 2014 00:36:15 +0000 (00:36 +0000)]
doc: fix typo in check.texi

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1093 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodoc: update check.texi with CMake tutorial
brarcher [Tue, 4 Feb 2014 00:36:12 +0000 (00:36 +0000)]
doc: update check.texi with CMake tutorial

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1092 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: MSVC wants the var decl at the top
brarcher [Tue, 4 Feb 2014 00:36:04 +0000 (00:36 +0000)]
example: MSVC wants the var decl at the top

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1091 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agocmake: install a check.cmake file to help configure projects
brarcher [Tue, 4 Feb 2014 00:35:56 +0000 (00:35 +0000)]
cmake: install a check.cmake file to help configure projects

If CMake was used to compile and install Check, then a check.cmake
file was generated and installed along with the library. If a project
wants to link against Check in this situation, then the project
will need to include that check.cmake file.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1090 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: add CMake based example
brarcher [Tue, 4 Feb 2014 00:35:43 +0000 (00:35 +0000)]
example: add CMake based example

This example does the same thing, just with CMake instead
of autotools.

Note that it uses a FindCheck.cmake file to locate
libcheck on the system using pkg-config. This file is
originally from the opensync project. Attribution and info
on how to find the original are included.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1089 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: clarify the autotools based example
brarcher [Tue, 4 Feb 2014 00:35:24 +0000 (00:35 +0000)]
example: clarify the autotools based example

there will be a CMake example later

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1088 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agosource test_output_strings from src tree tests dir
brarcher [Mon, 27 Jan 2014 04:41:52 +0000 (04:41 +0000)]
source test_output_strings from src tree tests dir

If Check is built out of tree, then the test_output_strings
file was expected to be in the build tree, which is not
where it is; it is in the source tree.

Now find the file in the same directory that the script is in.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1087 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoInclude test_output_strings in EXTRA_DIST
brarcher [Mon, 27 Jan 2014 04:41:50 +0000 (04:41 +0000)]
Include test_output_strings in EXTRA_DIST

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1086 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodoc: mention setting '-' as filename to log to stdout
brarcher [Mon, 27 Jan 2014 03:18:47 +0000 (03:18 +0000)]
doc: mention setting '-' as filename to log to stdout

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1085 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoNEWS: Mention logging to stdout if file name is "-"
brarcher [Mon, 27 Jan 2014 03:18:45 +0000 (03:18 +0000)]
NEWS: Mention logging to stdout if file name is "-"

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1084 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoNEWS: start heading for ongoing development
brarcher [Mon, 27 Jan 2014 03:18:44 +0000 (03:18 +0000)]
NEWS: start heading for ongoing development

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1083 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoTODO: Update with info on previous and next release
brarcher [Mon, 27 Jan 2014 03:18:42 +0000 (03:18 +0000)]
TODO: Update with info on previous and next release

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1082 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoRun indent on source
brarcher [Mon, 27 Jan 2014 03:18:40 +0000 (03:18 +0000)]
Run indent on source

The indent program was run against the source, to enforce a consistent
layout and spacing. The following arguments were used:

--blank-lines-after-declarations --blank-lines-after-procedures
--brace-indent0 --case-indentation4 --case-brace-indentation0
--no-space-after-function-call-names --no-space-after-casts
--declaration-indentation1 --no-blank-lines-after-commas
--braces-after-struct-decl-line --braces-after-func-def-line
--continue-at-parentheses --preprocessor-indentation0  --indent-level4
--no-tabs --dont-break-procedure-type --no-space-after-parentheses
--no-space-after-for --no-space-after-if --no-space-after-while

Note that this was not run againt the test files for two reasons:
1) some of the tests depend on the failures occuring on specific lines,
and I did not want to go through and fix that for each test.
2) indent does not know what to do with END_TEST, and thinks it is a
type modifier for the function that follows.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1081 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoAdd test for logging to stdout
brarcher [Mon, 27 Jan 2014 03:18:33 +0000 (03:18 +0000)]
Add test for logging to stdout

This checks that both setting "-" with the related
environment and with the srummer_set_*() call both
result in printing the logging data to stdout.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1080 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agomove all expected output strings to a common file
brarcher [Mon, 27 Jan 2014 03:18:32 +0000 (03:18 +0000)]
move all expected output strings to a common file

The test_output.sh script will eventually need strings
from the logging types.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1079 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoremove file accidentally checked in
brarcher [Mon, 27 Jan 2014 03:18:29 +0000 (03:18 +0000)]
remove file accidentally checked in

This file, a binary from a test run, should never have been
checked in.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1078 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoif log file name is "-", print to stdout instead
brarcher [Mon, 27 Jan 2014 03:18:28 +0000 (03:18 +0000)]
if log file name is "-", print to stdout instead

This is mostly to support logging TAP to stdout instead of
to a file. However, this is made more general and applies
to all log output types.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1077 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agomove common log opening code to common function
brarcher [Mon, 27 Jan 2014 03:18:26 +0000 (03:18 +0000)]
move common log opening code to common function

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1076 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agochange argument for 'close' from 2 -> 1
brarcher [Mon, 27 Jan 2014 03:18:24 +0000 (03:18 +0000)]
change argument for 'close' from 2 -> 1

The close variable determines if the file will be closed
after logging completes. It is used as a flag, and only really
needs to be '0' or '1'. A value of '2' is just confusing.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1075 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoAdd missing enumeration value to switch
brarcher [Sat, 25 Jan 2014 18:18:34 +0000 (18:18 +0000)]
Add missing enumeration value to switch

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1074 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoinclude headers to get tr_free() prototype
brarcher [Sat, 25 Jan 2014 18:18:32 +0000 (18:18 +0000)]
include headers to get tr_free() prototype

to remove a warning

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1073 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoinclude check_check.h, to avoid warnings
brarcher [Sat, 25 Jan 2014 18:18:31 +0000 (18:18 +0000)]
include check_check.h, to avoid warnings

Needed the prototypes of the make_*_suite() calls

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1072 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoremove main() args to remove warnings
brarcher [Sat, 25 Jan 2014 18:18:28 +0000 (18:18 +0000)]
remove main() args to remove warnings

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1071 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoremoving pedantic warning
brarcher [Sat, 25 Jan 2014 18:18:25 +0000 (18:18 +0000)]
removing pedantic warning

This results in printing warnings about the assert macros and
comma pasting, such as the following:

In file included from check_check_master.c:6:
../src/check.h:301:75: warning: Use of comma pasting extension is non-portable
      [-pedantic]
  ...__LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__, NULL)
                                              ^

To remove this warning, the macros would need to be reworked.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1070 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agomarking second arg in tap_lfun as unused
brarcher [Sat, 25 Jan 2014 18:18:23 +0000 (18:18 +0000)]
marking second arg in tap_lfun as unused

to remove a warning

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1069 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoremoving -Wmissing-noreturn
brarcher [Sat, 25 Jan 2014 18:18:21 +0000 (18:18 +0000)]
removing -Wmissing-noreturn

This warnings points out that many unit tests could be
declared as 'noreturn'. As all tests could or could not
return (it is up to them), the warning is being dropped.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1068 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoOnly pass non-const data to putenv
brarcher [Sat, 25 Jan 2014 18:18:19 +0000 (18:18 +0000)]
Only pass non-const data to putenv

The definition of putenv accepts non const data only.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1067 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agosimplify path and file name handling and honor const rules
brarcher [Sat, 25 Jan 2014 18:18:17 +0000 (18:18 +0000)]
simplify path and file name handling and honor const rules

the path and file name variables are not const, but were assigned
const strings. However, both variables could be reassigned
non const data, and the path_name could be allocated data.
To prevent this mix, they are both non-const and initially NULL.
If they are NULL during the print, they are replaced before printing.
Further, the path_name is now always free'd at the end, as it is
either NULL or allocated memory.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1066 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodo not pass const pointer to list API in unit test
brarcher [Sat, 25 Jan 2014 18:18:15 +0000 (18:18 +0000)]
do not pass const pointer to list API in unit test

The check list API does not accept const pointers.
Only pass in strings that are mutable in the check_list
unit tests.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1065 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agono longer violate the const part of 'const char *' in send functions.
brarcher [Sat, 25 Jan 2014 18:18:14 +0000 (18:18 +0000)]
no longer violate the const part of 'const char *' in send functions.

FailMsg and LocMsg contain char* fields which are not const. Assigning
the passed const char* to a FailMsg or LocMsg violates the const.
To avoid this, a copy of the data is made using strdup. Yes, the
extra copy is functionally unnecessary, but to honor the const
it must be done.

The alternative is to make the char* fields in FailMsg and LocMsg
const. This will not work, however, as those fields are sometimes
assigned malloc'ed data in the code and free'd. You cannot pass
a const pointer to free without a warning.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1064 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoRemoving const identifier from List data structure
brarcher [Sat, 25 Jan 2014 18:18:12 +0000 (18:18 +0000)]
Removing const identifier from List data structure

The const identifier on the data field of List would imply that
nothing is ever done to modify or destroy the data. However, the
data can be accessed later and modified or freed, as was being done
in places. By removing the const identifiers, the implied safety
of the stored values (which is being violated anyway) is not
advertised in the API.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1063 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoSilence type conversion warnings in the (u)pack_int functions
brarcher [Sat, 25 Jan 2014 18:18:10 +0000 (18:18 +0000)]
Silence type conversion warnings in the (u)pack_int functions

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1062 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agochange expected exit values of tests to consistently be signed chars
brarcher [Sat, 25 Jan 2014 18:18:08 +0000 (18:18 +0000)]
change expected exit values of tests to consistently be signed chars

when a forked process finishes, waitpid() will return the status
as an int. Several macros determine what the status means.
WEXITSTATUS() is defined as returning the low-order 8 bits of the status
argument that the child process passed to _exit() or exit(), or the
value the child process returned from main(). It makes sense for the
value to be stored as either a signed or unsigned char. As the
decision is arbitrary (e.g. it only matters internally to check),
signed is used to keep consistent with the _tcase_add_test function.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1061 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoChanging duration returned from DIFF_IN_USEC to unsigned long
brarcher [Sat, 25 Jan 2014 18:18:05 +0000 (18:18 +0000)]
Changing duration returned from DIFF_IN_USEC to unsigned long

In the case that the diff returned from the start and end of the test
overflowed an unsigned int, making the container for the result
an unsigned long. (This is the type returned from the macro anyway).

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1060 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoremove unnecessary patches for Windows
brarcher [Wed, 22 Jan 2014 03:08:52 +0000 (03:08 +0000)]
remove unnecessary patches for Windows

A superset of these patches is incorporated into Check proper.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1059 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoweb: update release side-bar for 0.9.12
brarcher [Tue, 21 Jan 2014 04:05:47 +0000 (04:05 +0000)]
web: update release side-bar for 0.9.12

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1058 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoweb: mention that MSVC is supported by Check
brarcher [Tue, 21 Jan 2014 04:05:44 +0000 (04:05 +0000)]
web: mention that MSVC is supported by Check

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1057 64e312b2-a51f-0410-8e61-82d0ca0eb02a