]> granicus.if.org Git - check/log
check
11 years agocmake: fix subunit lib check
brarcher [Wed, 25 Dec 2013 04:51:12 +0000 (04:51 +0000)]
cmake: fix subunit lib check

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

11 years agocmake: create a check_stdint.h file
brarcher [Wed, 25 Dec 2013 04:39:11 +0000 (04:39 +0000)]
cmake: create a check_stdint.h file

Sinple hack replacement for the autotools AX_CREATE_STDINT_H
command. There may be a better way to do this that actually
checks if stdint.h is available, and what to do if it is not.
However, There are checks for the various int types already.

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

11 years agoremove stray ` in file
brarcher [Wed, 25 Dec 2013 03:38:05 +0000 (03:38 +0000)]
remove stray ` in file

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

11 years agolibcompat: add CK_DLL_EXP to all functions
brarcher [Wed, 25 Dec 2013 03:05:12 +0000 (03:05 +0000)]
libcompat: add CK_DLL_EXP to all functions

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

11 years agoAdd CK_DLL_EXP for all functions in libcheck
brarcher [Wed, 25 Dec 2013 03:05:11 +0000 (03:05 +0000)]
Add CK_DLL_EXP for all functions in libcheck

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

11 years agocmake: Add definitions for snprintf if replacement is needed
brarcher [Wed, 25 Dec 2013 03:05:09 +0000 (03:05 +0000)]
cmake: Add definitions for snprintf if replacement is needed

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

11 years agocmake: remove unnecessary checks
brarcher [Wed, 25 Dec 2013 03:05:07 +0000 (03:05 +0000)]
cmake: remove unnecessary checks

These checks are checking for things that Check never uses.

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

11 years agolibcompat: remove fileno() replacement
brarcher [Wed, 25 Dec 2013 03:05:06 +0000 (03:05 +0000)]
libcompat: remove fileno() replacement

fileno() is no longer necessary, as pipe IO is now
handled with FILE API.

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

11 years agolibcompat: remove read() and write() checks
brarcher [Wed, 25 Dec 2013 03:05:04 +0000 (03:05 +0000)]
libcompat: remove read() and write() checks

read() and write() are now unnecessary, as all pipe IO is
done using FILE APIs.

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

11 years agolibcompat: remove pipe() replacement
brarcher [Wed, 25 Dec 2013 03:05:02 +0000 (03:05 +0000)]
libcompat: remove pipe() replacement

The pipe() call was only used in unit tests. As the ppack calls
now use only FILE APIs, pipe is unnecessary.

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

11 years agosnprintf: fix some compile time checks for MSVC
brarcher [Wed, 25 Dec 2013 03:05:00 +0000 (03:05 +0000)]
snprintf: fix some compile time checks for MSVC

MSVC with cmake results in a few compile time checks
in snprintf.c not being compilable. Changing the statements
such that MSVC can understand them.

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

11 years agouse only FILE* API for file reading/writing
brarcher [Wed, 25 Dec 2013 03:04:59 +0000 (03:04 +0000)]
use only FILE* API for file reading/writing

MSVC does not like switching between read()/write() API and
FILE* API using fileno(). The fileno() call seems to return something
that does not work with write(). Keeping the API used
consistent removes this problem.

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

11 years agocheck_msg.c: make open_tmp_file not static
brarcher [Wed, 25 Dec 2013 03:04:56 +0000 (03:04 +0000)]
check_msg.c: make open_tmp_file not static

The pack unit tests will need to have a way to create a
temporary file. Allowing them to use open_tmp_file is
simpler.

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

11 years agocheck_check_exit: remove unnecessary unistd.h include
brarcher [Wed, 25 Dec 2013 03:04:55 +0000 (03:04 +0000)]
check_check_exit: remove unnecessary unistd.h include

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

11 years agolibcompat: if _snprintf is available instead, us it
brarcher [Wed, 25 Dec 2013 03:04:53 +0000 (03:04 +0000)]
libcompat: if _snprintf is available instead, us it

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

11 years agocmake: use libcompat's snprintf if not available on system
brarcher [Wed, 25 Dec 2013 03:04:51 +0000 (03:04 +0000)]
cmake: use libcompat's snprintf if not available on system

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

11 years agocmake: add check for struct itimerspec for MSVC
brarcher [Wed, 25 Dec 2013 03:04:48 +0000 (03:04 +0000)]
cmake: add check for struct itimerspec for MSVC

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

11 years agoclock_gettime: remove some header includes, they are in libcompat.h
brarcher [Wed, 25 Dec 2013 03:04:47 +0000 (03:04 +0000)]
clock_gettime: remove some header includes, they are in libcompat.h

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

11 years agocmake: add checks for librt functions
brarcher [Wed, 25 Dec 2013 03:04:46 +0000 (03:04 +0000)]
cmake: add checks for librt functions

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

11 years agomodify how HAVE_FORK is determined in code
brarcher [Wed, 25 Dec 2013 03:04:44 +0000 (03:04 +0000)]
modify how HAVE_FORK is determined in code

autotools will define HAVE_FORK only if fork is available.
cmake can do the same thing on Linux, however on Windows
the only way to get HAVE_FORK to appear is to make it always
appear and contain a value. To support both autotools and
cmake, change the compile time check slightly to check that
HAVE_FORK is 1.

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

11 years agoAdd paren around if block
brarcher [Wed, 25 Dec 2013 03:04:41 +0000 (03:04 +0000)]
Add paren around if block

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

11 years agoFix fileno(get_pipe()) for MSVC
brarcher [Wed, 25 Dec 2013 03:04:39 +0000 (03:04 +0000)]
Fix fileno(get_pipe()) for MSVC

MSVC is unable to parse the code:
  fileno(get_pipe())
when directly as an argument for ppack() or punpack(). This may
be because fileno() is replaced with _fileno() in a #define.

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

11 years agocmake: only replace libcompat if all possibilities on system are missing
brarcher [Wed, 25 Dec 2013 03:04:38 +0000 (03:04 +0000)]
cmake: only replace libcompat if all possibilities on system are missing

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

11 years agocmake: add check for struct timespec for windows
brarcher [Wed, 25 Dec 2013 03:04:36 +0000 (03:04 +0000)]
cmake: add check for struct timespec for windows

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

11 years agocmake: add content to endifs
brarcher [Wed, 25 Dec 2013 03:04:34 +0000 (03:04 +0000)]
cmake: add content to endifs

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

11 years agocmake: add check for clockid_t
brarcher [Wed, 25 Dec 2013 03:04:33 +0000 (03:04 +0000)]
cmake: add check for clockid_t

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

11 years agocmake: use set() to set HAVE_FORK variable
brarcher [Wed, 25 Dec 2013 03:04:31 +0000 (03:04 +0000)]
cmake: use set() to set HAVE_FORK variable

In Windows, the add_definitions() call does not set the
HAVE_FORK variable for configuration files (check.h.in, test_var.in).

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

11 years agocmake: set HAVE_FORK=0 if fork is unavailable
brarcher [Wed, 25 Dec 2013 03:04:30 +0000 (03:04 +0000)]
cmake: set HAVE_FORK=0 if fork is unavailable

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

11 years agocmake: enable remaining tests
brarcher [Wed, 25 Dec 2013 03:04:28 +0000 (03:04 +0000)]
cmake: enable remaining tests

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

11 years agocmake: set srcdir env var for shell script test runners
brarcher [Wed, 25 Dec 2013 03:04:27 +0000 (03:04 +0000)]
cmake: set srcdir env var for shell script test runners

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

11 years agocmake: detect floor in math lib, as that is what is being used
brarcher [Wed, 25 Dec 2013 03:04:26 +0000 (03:04 +0000)]
cmake: detect floor in math lib, as that is what is being used

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

11 years agocmake: enable unit testing with check_check
brarcher [Wed, 25 Dec 2013 03:04:25 +0000 (03:04 +0000)]
cmake: enable unit testing with check_check

To invoke the tests, type:
$ make test

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

11 years agocmake: generate test_vars file for sh script tests
brarcher [Wed, 25 Dec 2013 03:04:24 +0000 (03:04 +0000)]
cmake: generate test_vars file for sh script tests

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

11 years agocmake: add check for subunit
brarcher [Wed, 25 Dec 2013 03:04:22 +0000 (03:04 +0000)]
cmake: add check for subunit

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

11 years agolibcompat.h: Correct HAVE_SETENV
brarcher [Wed, 25 Dec 2013 03:04:20 +0000 (03:04 +0000)]
libcompat.h: Correct HAVE_SETENV

The configure.ac script will set HAVE_DECL_SETENV if setenv exists.
This must not have been working, as no setenv tests must have
been executing.

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

11 years agocmake: always compile in memory leaking tests
brarcher [Wed, 25 Dec 2013 03:04:19 +0000 (03:04 +0000)]
cmake: always compile in memory leaking tests

The check_mem_leaks is not configured to compile with cmake.
As the target for cmake is Windows, and Windows does not have
a valgrind that will work, there is no point in supporting
it.

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

11 years agocmake: define HAVE_FORK if fork is detected
brarcher [Wed, 25 Dec 2013 03:04:18 +0000 (03:04 +0000)]
cmake: define HAVE_FORK if fork is detected

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

11 years agocmake: remove TIMEOUT_TESTS_ENABLE=0
brarcher [Wed, 25 Dec 2013 03:04:16 +0000 (03:04 +0000)]
cmake: remove TIMEOUT_TESTS_ENABLE=0

Check will determine if it can run time timeout tests, and which
ones, based on HAVE_FORK and HAVE_LIBRT.

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

11 years agoadd clock_t & timer_t to configure.ac and CMakeLists.txt instead
brarcher [Wed, 25 Dec 2013 03:04:14 +0000 (03:04 +0000)]
add clock_t & timer_t to configure.ac and CMakeLists.txt instead

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

11 years agoIf CK_FORK_GETENV is set, only set CK_FORK if HAVE_FORK
brarcher [Wed, 25 Dec 2013 03:04:12 +0000 (03:04 +0000)]
If CK_FORK_GETENV is set, only set CK_FORK if HAVE_FORK

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

11 years agolibcompat.h: include sys/time.h only if it is available
brarcher [Wed, 25 Dec 2013 03:04:10 +0000 (03:04 +0000)]
libcompat.h: include sys/time.h only if it is available

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

11 years agolibcompat: add alternative for gettimeofday
brarcher [Wed, 25 Dec 2013 03:04:09 +0000 (03:04 +0000)]
libcompat: add alternative for gettimeofday

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

11 years agolibcompat.h: rename several functions if the _ variant exists
brarcher [Wed, 25 Dec 2013 03:04:07 +0000 (03:04 +0000)]
libcompat.h: rename several functions if the _ variant exists

For fileno, getpid, pipe, putenv, read, strdup, and write,
if the name append with _ exists, use that instead.
This likely only applied to MSVC.

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

11 years agolibcompat.h: Include additional headers if MSVC
brarcher [Wed, 25 Dec 2013 03:04:06 +0000 (03:04 +0000)]
libcompat.h: Include additional headers if MSVC

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

11 years agosleep.c: use Sleep() if MSVC
brarcher [Wed, 25 Dec 2013 03:04:04 +0000 (03:04 +0000)]
sleep.c: use Sleep() if MSVC

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

11 years agolocaltime_r.c: provide additional alternatives
brarcher [Wed, 25 Dec 2013 03:04:02 +0000 (03:04 +0000)]
localtime_r.c: provide additional alternatives

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

11 years agospacing
brarcher [Wed, 25 Dec 2013 03:04:00 +0000 (03:04 +0000)]
spacing

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

11 years agoInitial commit of cmake support, based on mloskot patch
brarcher [Wed, 25 Dec 2013 03:03:58 +0000 (03:03 +0000)]
Initial commit of cmake support, based on mloskot patch

This commit is likely not functional yet. More changes
on the way for complete cmake support

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

11 years agotest_xml_output: add tests for valid duration for tests
brarcher [Mon, 23 Dec 2013 16:29:42 +0000 (16:29 +0000)]
test_xml_output: add tests for valid duration for tests

This is to check for the case where the duration is not -1
or in [0, CK_DEFAULT_TIMEOUT]. There was an issue with NO_FORK
mode where the duration was not valid.

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

11 years agomove clock_gettime calls outside of setjmp context for NO_FORK mode
brarcher [Mon, 23 Dec 2013 15:48:37 +0000 (15:48 +0000)]
move clock_gettime calls outside of setjmp context for NO_FORK mode

The test duration was getting smashed if tests failed in NO_FORK
mode. If the setjmp() function was used to abort a test, the end
time would not get captured. This resulted in arbitrary numbers
being written for the test's duration.

This change moves the settime() calls outside of the setjmp() context,
so the times get captured if the test passes or fails.

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

11 years agoweb: remove mention that unit tests fail on GNU/Hurd
brarcher [Sun, 22 Dec 2013 04:59:41 +0000 (04:59 +0000)]
web: remove mention that unit tests fail on GNU/Hurd

The issue was resolved, and the checkmk unit tests now pass.

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

11 years agocheckmk: change POSIX bracket expressions to be compatible with GNU/Hurd
brarcher [Sun, 22 Dec 2013 04:59:37 +0000 (04:59 +0000)]
checkmk: change POSIX bracket expressions to be compatible with GNU/Hurd

The version of mawk included in Hurd is quite old (at least 8 years)
and did not support the bracket extensions previously used.

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

11 years agoHACKING: Add information on updating just the website
brarcher [Sat, 21 Dec 2013 04:50:46 +0000 (04:50 +0000)]
HACKING: Add information on updating just the website

If Check's website needs to be updated between releases,
these instructions can be used.

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

11 years agoweb: Mention Install page in Supported Platforms section
brarcher [Sat, 21 Dec 2013 04:16:56 +0000 (04:16 +0000)]
web: Mention Install page in Supported Platforms section

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

11 years agoweb: mention GNU/Hurd and BSD in Supported Platforms section
brarcher [Sat, 21 Dec 2013 04:16:53 +0000 (04:16 +0000)]
web: mention GNU/Hurd and BSD in Supported Platforms section

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

11 years agoweb: set style for lists
brarcher [Sat, 21 Dec 2013 00:05:04 +0000 (00:05 +0000)]
web: set style for lists

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

11 years agoweb: add install page, describing how to install Check
brarcher [Sat, 21 Dec 2013 00:05:01 +0000 (00:05 +0000)]
web: add install page, describing how to install Check

This page describes how to install Check on various
platforms, either through a package manager or from source.

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

11 years agolibrt_timers.m4: use prev behavior when cross compiling
brarcher [Sat, 21 Dec 2013 00:04:59 +0000 (00:04 +0000)]
librt_timers.m4: use prev behavior when cross compiling

In the case where we are cross compiling, the POSIX detection of
the timer_create() function is skipped, and instead the usual check
for the existence of all the timer_* functions is done using
AC_REPLACE_FUNCS.

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

11 years agoindex.html: Add link for browsing current Check source
brarcher [Sat, 21 Dec 2013 00:04:56 +0000 (00:04 +0000)]
index.html: Add link for browsing current Check source

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

11 years agoDo not include memory leaking tests in check_mem_leaks
brarcher [Thu, 19 Dec 2013 19:47:11 +0000 (19:47 +0000)]
Do not include memory leaking tests in check_mem_leaks

check_mem_leaks is to be used with valgrind. That will check
if Check is leaking memory. Having tests that also intentionally
leak will give false positives.

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

11 years agoMark the test_null unit test as leaking memory
brarcher [Thu, 19 Dec 2013 19:47:07 +0000 (19:47 +0000)]
Mark the test_null unit test as leaking memory

This test calls a few Check functions, seeing if something bad
will happen. In the process, they leak some memory.

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

11 years agoAdd #define for disabling unit tests that intentionally leak memory
brarcher [Thu, 19 Dec 2013 19:47:04 +0000 (19:47 +0000)]
Add #define for disabling unit tests that intentionally leak memory

Some tests intentionally leak memory. Usually this is not a concern.
However, we want to run some of our tests against valgrind, to make
sure that Check itself is not leaking any memory. To enable this,
the tests that intentionally leak memory will be conditionally
compiled out when building a unit tests program for use with
valgrind.

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

11 years agoremove check_mem_leaks from "make check"
brarcher [Thu, 19 Dec 2013 16:48:27 +0000 (16:48 +0000)]
remove check_mem_leaks from "make check"

when run locally, all is well. Unit tests pass, and
valgrind says there is nothing wrong. When run on
some GNU/Linux build slave machine, running the unit test
dies with an invalid pointer free.

Will need to figure out how to reproduce this locally to
continue.

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

11 years agotry to add check_mem_leaks back into "make check"
brarcher [Thu, 19 Dec 2013 16:27:54 +0000 (16:27 +0000)]
try to add check_mem_leaks back into "make check"

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

11 years agotest_mem_leaks.sh: use libtool to invoke check_mem_leaks
brarcher [Thu, 19 Dec 2013 16:27:53 +0000 (16:27 +0000)]
test_mem_leaks.sh: use libtool to invoke check_mem_leaks

The libtool documentation says the proper way to invoke the
compiled program before it is installed is to use libtool.

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

11 years agocheck_mem_leaks: trim down to only use libcheck
brarcher [Thu, 19 Dec 2013 16:27:51 +0000 (16:27 +0000)]
check_mem_leaks: trim down to only use libcheck

Previously the unit tests was linking against libcheckinternal.

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

11 years agoRemove check_mem_leaks from "make check"
brarcher [Thu, 19 Dec 2013 16:02:03 +0000 (16:02 +0000)]
Remove check_mem_leaks from "make check"

All my local systems will compile and run check_mem_leaks without
issue. However, the build slaves are all unable to run it, for
various reasons.

For now, removing it from "make check" to prevent someone's build for
failing for no good reason. Will revisit this once more is known.

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

11 years agoAdd check_mem_leaks.sh to EXTRA_DIST
brarcher [Thu, 19 Dec 2013 16:01:59 +0000 (16:01 +0000)]
Add check_mem_leaks.sh to EXTRA_DIST

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

11 years agoNEWS: add lines near the top that happen to mention 0.9.11
brarcher [Thu, 19 Dec 2013 04:31:49 +0000 (04:31 +0000)]
NEWS: add lines near the top that happen to mention 0.9.11

The distcheck target requires that the current version,
0.9.11, appear in the first 15 lines. After enough stuff
was added to NEWS, this broke, and the prereleasecheck
target (which uses distcheck) no longer worked.

These lines will have to be removed before the next release.

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

11 years agoNEWS: update with recent additions
brarcher [Wed, 18 Dec 2013 23:03:11 +0000 (23:03 +0000)]
NEWS: update with recent additions

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

11 years agoindex.html: mention OpenBSD support.
brarcher [Wed, 18 Dec 2013 23:03:09 +0000 (23:03 +0000)]
index.html: mention OpenBSD support.

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

11 years agoconfigure.ac: use the librt_timer.m4 checks
brarcher [Wed, 18 Dec 2013 23:03:08 +0000 (23:03 +0000)]
configure.ac: use the librt_timer.m4 checks

Hopefully with this the default ./configure will
work on OpenBSD.

Note that --enable-timer-replacement will still override the
check, resulting the Check's replacements being used.

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

11 years agolibrt_timers.m4: check if timer_create() is usable
brarcher [Wed, 18 Dec 2013 23:03:06 +0000 (23:03 +0000)]
librt_timers.m4: check if timer_create() is usable

Adds a custom check for the timer_create() function on the target
system.

It was found that on OpenBSD, the timer_create(), timer_settime(),
and timer_delete() functions were only stubbed out. They set
errno to ENOSYS and return -1. To detect this and replace the timer_*
functions with libcompat's, this m4 file will execute a test
program on the system, checking for the ENOSYS errno.

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

11 years agotest_mem_leak.sh: add convenience script for running valgrind
brarcher [Wed, 18 Dec 2013 21:37:11 +0000 (21:37 +0000)]
test_mem_leak.sh: add convenience script for running valgrind

This script will run valgrind against check_mem_leaks, and
determine if there are any memory leaks.

This is not run as part of "make check", as valgrind really only works
on GNU/Linux. (It is available on OSX, but does not really work).

We will need to run this ourselves (or from our continuous integration
server) to periodically check for leaks.

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

11 years agocheck_mem_leaks: add new unit test for use against valgrind
brarcher [Wed, 18 Dec 2013 21:37:09 +0000 (21:37 +0000)]
check_mem_leaks: add new unit test for use against valgrind

The purpose of this test is to be used by valgrind to check for
memory leaks. Each public API that check exports is used at
least once. Tests which use non-public API, or leak intentionally,
are not included here.

The test should pass when run, and is added to the list of tests to
run with "make check".

Actually using valgrind to check for memory leaks is outside of its
running with "make check". One still would need to manually run
valgrind.

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

11 years agoconfigure.ac: add option to force Check's replacement of timer_* functions
brarcher [Wed, 18 Dec 2013 19:46:56 +0000 (19:46 +0000)]
configure.ac: add option to force Check's replacement of timer_* functions

On OpenBSD 5.4 (and perhaps other BSDs) the timer_* functions
are implemented, but do nothing. Instead, they set errno to
ENOSYS (not available) and return -1. Check would check if
the timer_* functions were missing, and would use its own
replacements if they were. However, because they actually do
exist, Check does not know to replace them.

This adds another configure option, --enable-timer-replacement, which
will force Check's timer replacements instead of detecting the need.
There is still no checking if the replacements are needed or not
for OpenBSD, but at least this gives an option so check will work
properly.

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

11 years ago.gitignore: remove checkmk, but add CMakeLists.txt
brarcher [Wed, 18 Dec 2013 19:46:54 +0000 (19:46 +0000)]
.gitignore: remove checkmk, but add CMakeLists.txt

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

11 years agocheckmk: tcase_add_loop_test support in checkmk
brarcher [Wed, 18 Dec 2013 19:46:52 +0000 (19:46 +0000)]
checkmk: tcase_add_loop_test support in checkmk

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

11 years agocheck_run: add parenthesis
brarcher [Tue, 17 Dec 2013 22:12:28 +0000 (22:12 +0000)]
check_run: add parenthesis

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

11 years agocheck_check_fixture: free suite runners when finished
brarcher [Tue, 17 Dec 2013 22:12:26 +0000 (22:12 +0000)]
check_check_fixture: free suite runners when finished

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

11 years agocheck_check_msg: use proper free for TestResult
brarcher [Tue, 17 Dec 2013 22:12:25 +0000 (22:12 +0000)]
check_check_msg: use proper free for TestResult

The TestResult was being freed, but not all the points to
live data it was holding.

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

11 years agocreate function for freeing a TestResult
brarcher [Tue, 17 Dec 2013 22:12:23 +0000 (22:12 +0000)]
create function for freeing a TestResult

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

11 years agofix potential leaks when assigning result message
brarcher [Tue, 17 Dec 2013 22:12:20 +0000 (22:12 +0000)]
fix potential leaks when assigning result message

In some cases, a result message has already been allocated,
which is then overwritten by set_fork_info(). Just in case,
check if tr->msg is not null, and if so free the value, before
assigning a new value.

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

11 years agoAdd comment, mentioning time resolution of stored duration
brarcher [Tue, 17 Dec 2013 22:12:17 +0000 (22:12 +0000)]
Add comment, mentioning time resolution of stored duration

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

11 years agoMove NANOS_PER_SECONDS to check_impl.h with other time defines
brarcher [Tue, 17 Dec 2013 22:12:15 +0000 (22:12 +0000)]
Move NANOS_PER_SECONDS to check_impl.h with other time defines

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

11 years agoAdd #define for US_PER_SEC, to avoid magic numbers
brarcher [Tue, 17 Dec 2013 22:12:12 +0000 (22:12 +0000)]
Add #define for US_PER_SEC, to avoid magic numbers

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

11 years agoAdd *.tap to CLEANFILES
brarcher [Tue, 17 Dec 2013 16:42:04 +0000 (16:42 +0000)]
Add *.tap to CLEANFILES

Otherwise, make preleasecheck will fail due to the extra test.tap
file.

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

11 years agoadd test_tap_output.sh to EXTRA_DIST
brarcher [Tue, 17 Dec 2013 16:42:03 +0000 (16:42 +0000)]
add test_tap_output.sh to EXTRA_DIST

Otherwise, the preleasecheck target will not pass

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

11 years agodoc: add link to TAP specification.
brarcher [Tue, 17 Dec 2013 16:42:01 +0000 (16:42 +0000)]
doc: add link to TAP specification.

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

11 years agoAdd unit tests for TAP logging setup functions
brarcher [Tue, 17 Dec 2013 16:07:15 +0000 (16:07 +0000)]
Add unit tests for TAP logging setup functions

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

11 years agoAlways remove test output before running new test
brarcher [Tue, 17 Dec 2013 16:07:14 +0000 (16:07 +0000)]
Always remove test output before running new test

Just in case the output is left over from the previous test run

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

11 years agouse variable OUTPUT_FILE for tests that check logging output
brarcher [Tue, 17 Dec 2013 16:07:11 +0000 (16:07 +0000)]
use variable OUTPUT_FILE for tests that check logging output

This is better than hard coding the name throghout the test

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

11 years agoadd support for descriptions in TAP logging
brarcher [Tue, 17 Dec 2013 16:07:10 +0000 (16:07 +0000)]
add support for descriptions in TAP logging

The description on a TAP output line is as follows:

[not] ok (number) - (file):(suite name):(test name): (message)

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

11 years agoNEWS: mention logging support for TAP
brarcher [Tue, 17 Dec 2013 16:07:07 +0000 (16:07 +0000)]
NEWS: mention logging support for TAP

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

11 years agodoc: update to mention TAP logging
brarcher [Tue, 17 Dec 2013 16:07:05 +0000 (16:07 +0000)]
doc: update to mention TAP logging

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

11 years agoAdd steps to release for updating index.html page
brarcher [Tue, 17 Dec 2013 16:07:03 +0000 (16:07 +0000)]
Add steps to release for updating index.html page

The latest release information will need to be updated
on the index.html landing page whenever check has a release.

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

11 years agoAdd make target for updating check's landing page
brarcher [Tue, 17 Dec 2013 16:07:01 +0000 (16:07 +0000)]
Add make target for updating check's landing page

Just in case one wants to update the webpage between releases.

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

11 years agoseparate releasevars into two tasks for version and username
brarcher [Tue, 17 Dec 2013 16:07:00 +0000 (16:07 +0000)]
separate releasevars into two tasks for version and username

This way, other tasks can check for just one of these.

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

11 years agoAdd to NEWS information on refactoring check's asserts
brarcher [Tue, 17 Dec 2013 16:06:58 +0000 (16:06 +0000)]
Add to NEWS information on refactoring check's asserts

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

11 years agospacing
brarcher [Tue, 17 Dec 2013 16:06:57 +0000 (16:06 +0000)]
spacing

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