]> granicus.if.org Git - check/log
check
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

10 years ago* Update for release
brarcher [Tue, 21 Jan 2014 03:11:24 +0000 (03:11 +0000)]
* Update for release

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

10 years agoweb: add new user of check
brarcher [Thu, 16 Jan 2014 23:08:03 +0000 (23:08 +0000)]
web: add new user of check

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

10 years agodoc: fix logic typo in fail_* API description
brarcher [Sun, 12 Jan 2014 20:19:41 +0000 (20:19 +0000)]
doc: fix logic typo in fail_* API description

Patch provided by Bill Kolokithas

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

10 years agocheckmk: list new supported directives
brarcher [Sun, 12 Jan 2014 20:19:37 +0000 (20:19 +0000)]
checkmk: list new supported directives

Patch provided by Bill Kolokithas

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

10 years agocheckmk: replace usage of deprecated check calls
brarcher [Sun, 12 Jan 2014 20:19:34 +0000 (20:19 +0000)]
checkmk: replace usage of deprecated check calls

Patch provided by Bill Kolokithas

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

10 years agocheck_check_pack: use NULL as 'invalid string' instead of a literal
brarcher [Thu, 9 Jan 2014 03:51:55 +0000 (03:51 +0000)]
check_check_pack: use NULL as 'invalid string' instead of a literal

Just in case something does go wrong, the string literal could
end up being free'd. To prevent this, use NULL as the "this should
not happen" example instead.

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

10 years agocheck_check_fixture: free TestResult array when finished
brarcher [Thu, 9 Jan 2014 03:51:53 +0000 (03:51 +0000)]
check_check_fixture: free TestResult array when finished

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

10 years agocheck_check_pack: free result_file at end of test
brarcher [Thu, 9 Jan 2014 03:51:50 +0000 (03:51 +0000)]
check_check_pack: free result_file at end of test

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

10 years agoautotools/cmake: add cmake files to distribution
brarcher [Tue, 7 Jan 2014 03:24:48 +0000 (03:24 +0000)]
autotools/cmake: add cmake files to distribution

Otherwise, the cmake files will not get distributed with
the next check release.

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

10 years agotest_vars: add extra spaces around !=
brarcher [Tue, 7 Jan 2014 03:24:44 +0000 (03:24 +0000)]
test_vars: add extra spaces around !=

sh is picky about space, and without it the last part
of the condition always evaluates to true.

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

10 years agotest_vars: also check @IS_MSVC@ content
brarcher [Mon, 6 Jan 2014 13:25:14 +0000 (13:25 +0000)]
test_vars: also check @IS_MSVC@ content

On autotools if @IS_MSVC@ is not defined, it is left as a string
literal, instead of being nothing. Because of that, the content
is now also checked. For CMake and MSVC, @IS_MSVC@ will be '1'.
Otherwise, it can be anything else.

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

10 years agoweb: mention "Windows" on all Windows options
brarcher [Mon, 6 Jan 2014 04:41:54 +0000 (04:41 +0000)]
web: mention "Windows" on all Windows options

All the other options mention their OS, Windows options
should to.

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

10 years agoNEWS: Add information on Check with MSVC
brarcher [Mon, 6 Jan 2014 04:41:53 +0000 (04:41 +0000)]
NEWS: Add information on Check with MSVC

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

10 years agoNEWS: Add clarification to running check_check in Windows
brarcher [Mon, 6 Jan 2014 04:41:51 +0000 (04:41 +0000)]
NEWS: Add clarification to running check_check in Windows

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

10 years agocheck for both / and \ when logging XML
brarcher [Mon, 6 Jan 2014 04:41:48 +0000 (04:41 +0000)]
check for both / and \ when logging XML

Windows uses \ for directory delimitors, so detect that as well

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

10 years agoOnly create datetime string if localtime_r succeeded
brarcher [Mon, 6 Jan 2014 04:41:46 +0000 (04:41 +0000)]
Only create datetime string if localtime_r succeeded

On MSVC localtime_r (which redirects to localtime in libcompat)
can fail. The reason is not yet known. Instead of printing
garbage in this case, simply do not print the date time.

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

10 years agolibcompat: fix typo in comment
brarcher [Mon, 6 Jan 2014 04:41:44 +0000 (04:41 +0000)]
libcompat: fix typo in comment

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

10 years agolibcompat: remove alternatives for localtime_r
brarcher [Mon, 6 Jan 2014 04:41:41 +0000 (04:41 +0000)]
libcompat: remove alternatives for localtime_r

returning to the previous localtime_r implementation that uses
localtime. The _localtime64_s implementation had issues, in that
it wanted to write to the "now" variable. (Should have been
passed "result" instead). Further, on MSVC (for which this replacement
is being considered) localtime redirects to _localtime64_s anyway.

For how Check is using localtime_r, just using localtime is
sufficient.

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

10 years agotest_vars: add correct slash if on Unix or MSVC
brarcher [Mon, 6 Jan 2014 04:41:39 +0000 (04:41 +0000)]
test_vars: add correct slash if on Unix or MSVC

The IS_MSVC variable is only set from CMake, and only if
the platform is MSVC. If it is not set, the Unix slash will
be used.

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

10 years agotest_vars: deterine final value for SRCDIR in test_vars
brarcher [Mon, 6 Jan 2014 04:41:36 +0000 (04:41 +0000)]
test_vars: deterine final value for SRCDIR in test_vars

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

10 years agocmake: configure test_vars in the tests' CMakeLists.txt
brarcher [Mon, 6 Jan 2014 04:41:34 +0000 (04:41 +0000)]
cmake: configure test_vars in the tests' CMakeLists.txt

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

10 years agoweb: add help for compiling Check with MSVC
brarcher [Mon, 6 Jan 2014 04:41:32 +0000 (04:41 +0000)]
web: add help for compiling Check with MSVC

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

10 years agoweb: add help for compiling check using Visual Studios
brarcher [Mon, 6 Jan 2014 04:41:30 +0000 (04:41 +0000)]
web: add help for compiling check using Visual Studios

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

10 years agoNEWS: update with info on new Check unit tests
brarcher [Mon, 6 Jan 2014 04:41:28 +0000 (04:41 +0000)]
NEWS: update with info on new Check unit tests

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

10 years agotest_output.sh: fix typo in variable name
brarcher [Sat, 4 Jan 2014 19:39:44 +0000 (19:39 +0000)]
test_output.sh: fix typo in variable name

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

10 years agoonly test test_invalid_set_fork_status if not mem leak checking
brarcher [Sat, 4 Jan 2014 19:26:38 +0000 (19:26 +0000)]
only test test_invalid_set_fork_status if not mem leak checking

This test leaks memory, as the allocated suite, test case, and
suite runner remain after the call to srunner_run_all() calls
exit(2) due to the error.

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

10 years agocheck_run.c: remove unreachable code
brarcher [Sat, 4 Jan 2014 19:26:36 +0000 (19:26 +0000)]
check_run.c: remove unreachable code

This code cannot be reached, as tr->msg is never not NULL in
this scope.

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

10 years agocheck_check_pack: add tests for using pack(), upack() improperly
brarcher [Sat, 4 Jan 2014 18:34:10 +0000 (18:34 +0000)]
check_check_pack: add tests for using pack(), upack() improperly

Sure, check does not use these improperly, but if we did,
just making sure they respond as expected.

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

10 years agotest_output.sh: add tests for srunner_print()
brarcher [Sat, 4 Jan 2014 18:34:08 +0000 (18:34 +0000)]
test_output.sh: add tests for srunner_print()

There were no tests for srunner_print(). These tests, when run
with the STDOUT_DUMP output type, will output the normal
output to stdout, then call
   srunner_print()
on each output type, dumping that to stdout.

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

10 years agotest_output.sh: spacing
brarcher [Sat, 4 Jan 2014 18:34:06 +0000 (18:34 +0000)]
test_output.sh: spacing

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

10 years agotest_output.sh: separate progress and result from expected output
brarcher [Sat, 4 Jan 2014 18:34:05 +0000 (18:34 +0000)]
test_output.sh: separate progress and result from expected output

This separation will make testing the output of srunner_print()
easier later on.

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

10 years agoex_output.c: add new output mode STDOUT_DUMP
brarcher [Sat, 4 Jan 2014 18:34:03 +0000 (18:34 +0000)]
ex_output.c: add new output mode STDOUT_DUMP

This mode will print the normal suite progress and result to
stdout, but then dump every mode using
  srunner_print()

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

10 years agocheck_log.c: remove unnecessary checks for CK_ENV
brarcher [Sat, 4 Jan 2014 18:34:01 +0000 (18:34 +0000)]
check_log.c: remove unnecessary checks for CK_ENV

this code is unnecessary, as srunner_register_lfun will
determine the real print mode before stdout_lfun gets called.
That is, CK_ENV will never be passed.

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

10 years agotest_output.sh: spacing
brarcher [Sat, 4 Jan 2014 18:33:59 +0000 (18:33 +0000)]
test_output.sh: spacing

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

10 years agoAdd tests for CK_VERBOSITY env var
brarcher [Sat, 4 Jan 2014 18:33:58 +0000 (18:33 +0000)]
Add tests for CK_VERBOSITY env var

There were previously no tests that checked this.

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

10 years agotest_output.sh: do not include leading 'x' in expected output
brarcher [Sat, 4 Jan 2014 18:33:56 +0000 (18:33 +0000)]
test_output.sh: do not include leading 'x' in expected output

Mostly because it can be confusing.

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

10 years agotest_output.sh: rename variables to make sense
brarcher [Sat, 4 Jan 2014 18:33:55 +0000 (18:33 +0000)]
test_output.sh: rename variables to make sense

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

10 years agoadd test for check_list_advance(NULL)
brarcher [Sat, 4 Jan 2014 18:33:53 +0000 (18:33 +0000)]
add test for check_list_advance(NULL)

There had been no test yet for this case.

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

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