]> granicus.if.org Git - check/log
check
10 years agoAdd test for setting invalid for status
brarcher [Sat, 4 Jan 2014 18:33:51 +0000 (18:33 +0000)]
Add test for setting invalid for status

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

10 years agoAdd new test case for Check error printouts
brarcher [Sat, 4 Jan 2014 18:33:49 +0000 (18:33 +0000)]
Add new test case for Check error printouts

When check hits an eprintf() call, this is a "Check error printout".
This test case, only available when fork() is available, will
test the instances when check should hit an eprintf() and exit.

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

10 years agodo not compile in msg and fork tests suites if fork() disabled
brarcher [Sat, 4 Jan 2014 18:33:46 +0000 (18:33 +0000)]
do not compile in msg and fork tests suites if fork() disabled

The tests were already disabled, but the TCase was still there,
but empty.

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

10 years agoAdd /* HAVE_FORK */ comment
brarcher [Sat, 4 Jan 2014 18:33:45 +0000 (18:33 +0000)]
Add /* HAVE_FORK */ comment

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

10 years agocheck_run.c: also check HAVE_FORK==0 for fork disabled
brarcher [Sat, 4 Jan 2014 18:33:43 +0000 (18:33 +0000)]
check_run.c: also check HAVE_FORK==0 for fork disabled

Using CMake, !defined(HAVE_FORK) is not sufficient to determine
if fork is unavailable, has HAVE_FORK=0 is possible.

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

10 years agocheck.c: remove tr_reset()
brarcher [Sat, 4 Jan 2014 18:33:41 +0000 (18:33 +0000)]
check.c: remove tr_reset()

This function was never called anywhere

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

10 years agocheck.c: remove debug
brarcher [Sat, 4 Jan 2014 18:33:39 +0000 (18:33 +0000)]
check.c: remove debug

removing some debug printing that was left in.

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

10 years agocheck_check_sub: add tests for suite_tcase(NULL,NULL)
brarcher [Sat, 4 Jan 2014 18:33:37 +0000 (18:33 +0000)]
check_check_sub: add tests for suite_tcase(NULL,NULL)

Previously a test that exercise this did not exist

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

10 years agocheck.h: export suite_tcase() function
brarcher [Sat, 4 Jan 2014 18:33:35 +0000 (18:33 +0000)]
check.h: export suite_tcase() function

Because it did not have CK_EXPORT in front of it, the symbol
was not being exported. It looks like this function should
be callable, but it could not before.

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

10 years agocmake: install check.h from the src directory
brarcher [Thu, 2 Jan 2014 13:19:28 +0000 (13:19 +0000)]
cmake: install check.h from the src directory

cmake was looking for check.h in the root directory, not under src.

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

10 years agocmake: only run shell unit tests if sh interpreter is available
brarcher [Thu, 2 Jan 2014 13:19:26 +0000 (13:19 +0000)]
cmake: only run shell unit tests if sh interpreter is available

Namely, on the MSVC IDE, there is none.

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

10 years agoNEWS: mention status of MSVC: check_check passes
brarcher [Thu, 2 Jan 2014 02:43:24 +0000 (02:43 +0000)]
NEWS: mention status of MSVC: check_check passes

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

10 years agocmake: remove HAVE_* for snprintf in config.h.in
brarcher [Thu, 2 Jan 2014 02:43:22 +0000 (02:43 +0000)]
cmake: remove HAVE_* for snprintf in config.h.in

Having these caused MSVC to not compile, not having them
makes Linux fail prior to adding these definitions
in CMakeLists.txt. As they now cause problems for MSVC, but
the CMakeLists.txt definitions allow Linux to compile, there
should not be any issue.

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

10 years agocmake: move snprintf definitions to make cmake file
brarcher [Thu, 2 Jan 2014 02:43:19 +0000 (02:43 +0000)]
cmake: move snprintf definitions to make cmake file

Keeping them in lib/CMakeLists.txt made them only visible
in libcompat. Moving them to the main CMakeLists.txt file
makes them visible to everything.

In addition, also setting the HAVE_* definitions if snprintf
is available.

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

10 years agocmake: do not check HAVE__SNPRINTF
brarcher [Thu, 2 Jan 2014 02:43:17 +0000 (02:43 +0000)]
cmake: do not check HAVE__SNPRINTF

This did not hurt anything, but was missed earlier

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

10 years agocmake: add printf entries to config.h.in
brarcher [Thu, 2 Jan 2014 02:43:15 +0000 (02:43 +0000)]
cmake: add printf entries to config.h.in

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

10 years agocmake: remove many unneeded entries in config.h.in
brarcher [Thu, 2 Jan 2014 02:43:13 +0000 (02:43 +0000)]
cmake: remove many unneeded entries in config.h.in

These entries are probably not hurting anything, but
are unnecessary.

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

10 years agolibcompat: remove ; from #defines
brarcher [Thu, 2 Jan 2014 02:43:11 +0000 (02:43 +0000)]
libcompat: remove ; from #defines

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

10 years agoCheck for MEMORY_LEAKING_TESTS_ENABLED consistently
brarcher [Thu, 2 Jan 2014 02:43:09 +0000 (02:43 +0000)]
Check for MEMORY_LEAKING_TESTS_ENABLED consistently

The line number table did not have the related test
compiled out when it should have.

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

10 years agoCheck for __GNUC__ consistently
brarcher [Thu, 2 Jan 2014 02:43:07 +0000 (02:43 +0000)]
Check for __GNUC__ consistently

Some tests will only be executed if compiled on gcc. However,
some of the tables did not have the related entries
compiled out when compiled on MSVC. This lead to crashes during
tests. Removing the entries correctly prevents this.

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

10 years agoAlways check HAVE_FORK==1 if defined
brarcher [Thu, 2 Jan 2014 02:43:05 +0000 (02:43 +0000)]
Always check HAVE_FORK==1 if defined

For autotools this is not an issue, as HAVE_FORK is only
defined if fork is available, and thus HAVE_FORK==1.

Cmake, though, will define it either way, so it is possible
for HAVE_FORK==0. Most of these were caught earlier, but
a few were missed.

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

10 years agolibcompat: put snprintf defines in libcompat.h
brarcher [Thu, 2 Jan 2014 02:43:02 +0000 (02:43 +0000)]
libcompat: put snprintf defines in libcompat.h

On MSVC, the cmake definitions do not seem to work as expected.
Putting the snprintf and vsnprintf definitions in libcompat.h.

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

10 years agolibcompat: do not use _snprintf even if available
brarcher [Thu, 2 Jan 2014 02:43:00 +0000 (02:43 +0000)]
libcompat: do not use _snprintf even if available

After going back and forth on this one, it seems simpler to
use libcompat's snprintf, even if _snprintf is available.

There were issues on MSVC using _snprintf.

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

10 years agocmake: add definitions for remaining printf functions
brarcher [Thu, 2 Jan 2014 02:42:57 +0000 (02:42 +0000)]
cmake: add definitions for remaining printf functions

Just in case they are needed for snprintf.c

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

10 years agocmake: add checks for remaining printf functions
brarcher [Thu, 2 Jan 2014 02:42:55 +0000 (02:42 +0000)]
cmake: add checks for remaining printf functions

snprintf.c expects several HAVE_* definitions, and by only checking
snprintf, most are unavailable which cause linking problems
with MSVC

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

10 years agocmake: enable unit test test_check_nofork.sh
brarcher [Thu, 2 Jan 2014 02:42:50 +0000 (02:42 +0000)]
cmake: enable unit test test_check_nofork.sh

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

10 years agocmake: extract check version from configure.ac
brarcher [Thu, 2 Jan 2014 02:42:47 +0000 (02:42 +0000)]
cmake: extract check version from configure.ac

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

10 years agocmake: remove unnecessary check for strerror()
brarcher [Thu, 2 Jan 2014 02:42:45 +0000 (02:42 +0000)]
cmake: remove unnecessary check for strerror()

There is no replacement for strerror currently. If this check
failed, nothing would be done anyway.

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

10 years agocheck_check_sub: sleep during test_eternal
brarcher [Thu, 2 Jan 2014 02:42:43 +0000 (02:42 +0000)]
check_check_sub: sleep during test_eternal

For some reason on Linux (maybe other systems) if
check_check is canceled (e.g. Ctrl+C) when the test_eternal
is running, check_check will still run in the background
on this test. Because the test is in a tight loop,
it eats lots of CPU. Replacing the busy loop with the sleep
does not fix the problem, but at least when it happens
it will not take lots of CPU.

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

10 years agolibcompat: remove replacement for sleep()
brarcher [Thu, 2 Jan 2014 02:42:40 +0000 (02:42 +0000)]
libcompat: remove replacement for sleep()

Before working on MSVC support, the replacement sleep() call
only called assert(). Instead, it was assumed that the related
code would not be called, as the only platform that did not
provide a sleep() call also did not provide fork() (e.g. Windows),
so the related code never got executed.

As we still do not provide a fork(), the sleep() replacement is
unnecessary as it is never called. If, in the future, Check
provides a fork() replacement, then a sleep() replacement will
make sense.

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

10 years agolibcompat: remove unsetenv replacement
brarcher [Thu, 2 Jan 2014 02:42:37 +0000 (02:42 +0000)]
libcompat: remove unsetenv replacement

no system to date has been found that provides setenv
but not unsetenv. If setenv is unavailable, all related
tests are disabled at compile time. This stub replacement
does not serve any purpose. If in the future a system
with unsetenv is found that does provide setenv, then
the unit tests will need to disable all tests that
require unsetenv.

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

10 years agolibcompat: remove putenv replacement
brarcher [Thu, 2 Jan 2014 02:42:33 +0000 (02:42 +0000)]
libcompat: remove putenv replacement

the putenv replacement did nothing except call abort().
There is no platform (yet) which did not have putenv()
but did have fork(). For this reason, the assert()
has yet to be hit, meaning that the stub itself is
pointless.

If in the future a platform is found to have fork() but
not putenv(), then the related tests need to be disabled
at compile time using something like
  #if defined(HAVE_DECL_PUTENV)
along with a related AC_CHECK_DECLS check.

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

10 years agocmake: remove unnecessary check for getenv()
brarcher [Thu, 2 Jan 2014 02:42:31 +0000 (02:42 +0000)]
cmake: remove unnecessary check for getenv()

autotools does not currently check for getenv(), so there
is nothing to do if it is actually missing.

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

10 years agolibcompat: do not offer to replace setenv
brarcher [Thu, 2 Jan 2014 02:42:29 +0000 (02:42 +0000)]
libcompat: do not offer to replace setenv

if setenv is missing on the system, the only thing that is
affected are unit tests. Check itself does not need setenv.
In this case, the affected unit tests are not compiled in.

This change removed the stub setenv replacement which was
never called, even when a system did not provide it.

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

10 years agoreplace how setenv availability is detected
brarcher [Thu, 2 Jan 2014 02:42:26 +0000 (02:42 +0000)]
replace how setenv availability is detected

The generated config.h file defines HAVE_DECL_SETENV, which
was checked at compile time in libcompat to create
HAVE_WORKING_SETENV. There is no reason to have the latter, when
the former can be used directly.

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

11 years agotest_xml_output: do not use -n with echo
brarcher [Tue, 31 Dec 2013 20:39:33 +0000 (20:39 +0000)]
test_xml_output: do not use -n with echo

On some systems (e.g. OSX) a script will use the built-in version
of echo, which does not support arguments. Instead of getting no
newline, instead there is an extra "-n" in the output.

Without the -n, everything works as expected.

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

11 years agoautotools: include pthread.h when checking for clockid_t/timer_t
brarcher [Tue, 31 Dec 2013 20:39:31 +0000 (20:39 +0000)]
autotools: include pthread.h when checking for clockid_t/timer_t

Must include pthread.h to check for clockid_t and timer_t. This is
because MinGW and MinGW-w64 both put the time related definitions
in pthread headers and not in sys/types.h. Without optionally
including pthread.h, the check for these types may mistakenly fail.

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

11 years agoconsolidate all output tests into ex_output.c
brarcher [Fri, 27 Dec 2013 18:18:17 +0000 (18:18 +0000)]
consolidate all output tests into ex_output.c

This way, it will be simpler to add more outputs. Simply extend
this file. Further, if any bugs are found and needed to be
regression tested, they are added to only one place.

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

11 years agoautotools: do not make ex_*_output tests
brarcher [Fri, 27 Dec 2013 18:18:14 +0000 (18:18 +0000)]
autotools: do not make ex_*_output tests

All the output tests are being consolidated into ex_output.c

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

11 years agocmake: do not make the ex_*_output tests
brarcher [Fri, 27 Dec 2013 18:18:13 +0000 (18:18 +0000)]
cmake: do not make the ex_*_output tests

They are being removed, to be consolidated into ex_output.c

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

11 years agocmake: always set a value for ENABLE_SUBUNIT
brarcher [Wed, 25 Dec 2013 05:09:39 +0000 (05:09 +0000)]
cmake: always set a value for ENABLE_SUBUNIT

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

11 years agocmake: remove fake subunit check
brarcher [Wed, 25 Dec 2013 05:09:37 +0000 (05:09 +0000)]
cmake: remove fake subunit check

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

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