Branden Archer [Sat, 13 May 2017 01:43:37 +0000 (21:43 -0400)]
Update 'no messaging setup' message
It was found that if a ck_assert() or ck_abort() call was made when not running a test
with srunner_run() that the current process would attempt to report a test
failure to the process which started the test, of which none exists. As a result,
finding no pipe file setup, the process aborts. This is all due to an API usage
mistake, as ck_assert* and ck_abort() should not be called outside of a
test or setup/teardown function.
To make it more clear that if one hits this it is a API usage issue, changing the
failure message which is reported.
Branden Archer [Wed, 10 May 2017 02:29:19 +0000 (22:29 -0400)]
Bail on error if cannot create pipe file
There have been cases where a test will fail with "No messaging setup". This is believed to be
a permissions issue, where the test process is unable to create a file in the folder selected
for temporary files. To make this error more explicit, if creating a temporary file fails bail.
Nicholas Humfrey [Sun, 15 Jan 2017 23:19:03 +0000 (23:19 +0000)]
Fix for "invalid suffix on literal" error in clang
Invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
Branden Archer [Fri, 23 Dec 2016 04:01:21 +0000 (23:01 -0500)]
Disable SIGFPE tests for Cygwin until fixed
The test_fpe and test_mark_point tests currently fail on Cygwin.
Instead of the test process receiving a SIGFPE it instead fails
with a SIGSEGV. The reason is not yet know. However, attempting a
simple program that installs a SIGFPE handler then does a
raise(SIGFPE) does result in the handler being called.
This tests need to be enabled again once the reason for the failures
is resolved.
Branden Archer [Thu, 22 Dec 2016 19:13:18 +0000 (14:13 -0500)]
Remove usage of "lg" in printf format
MinGW on Windows does not "lg". The reason is that MinGW mixes
GCC and the MSVC runtime. For GCC a long double is either
96-bit or 128-bit type for long double on x86 or x64 targets
(see http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html).
However, MSVC uses a 64-bit type
(see http://msdn.microsoft.com/en-us/library/9cx8xs15.aspx).
That means for MSVC "double" and "long double" are the same.
Because of this mismatch, the "l" in "lg", which is safely ignored
on Linux and BSD systems is not safely ignored in MSVC systems
where GCC is used to compile. This issue does not arise when using
VS compiler on Windows.
Branden Archer [Sun, 18 Dec 2016 16:47:46 +0000 (11:47 -0500)]
Change how a tmp dir is found
It was found that on Windows the TMPDIR environment variable was
honored, but for Linux/et al it was not. This resulted in files ending
up in the build directory (the present directory when the tests
were run). As the test may not have permission to write in the build
directory, attempt to honor the P_tmpdir macro or TMPDIR environment
variable.
Branden Archer [Mon, 7 Nov 2016 01:32:26 +0000 (20:32 -0500)]
Use ctest on VC builds to run unit tests
msbuild was running the unit tests, but if a failure was hit
the output of the unit tests was not printed. As a result,
there was no indication as to what actually failed in a given
unit test program. Using ctest (part of CMake) should
output the unit test program's output for better failure
diagnosis.
Branden Archer [Sat, 5 Nov 2016 04:27:58 +0000 (00:27 -0400)]
Better error reporting for check_check_sub failures
If a unit test covered in check_check_sub fails report
the specific test case and test name, as to better identify
which test is failing and under what environment.
Branden Archer [Sun, 6 Nov 2016 14:01:40 +0000 (09:01 -0500)]
List test names in the master_tests table
Sometimes it is tricky to track down a unit test failure
as it is difficult to see which test actually failed.
To help make this easier all unit tests in the master_tests
table will now have the test name recorded. This will be
verified at unit test time as well, to ensure the test name
is accurate.
Branden Archer [Sat, 5 Nov 2016 04:14:52 +0000 (00:14 -0400)]
Add call for retrieving test name
This will be used internally to determine the current running test
and recording it during the check_check_sub tests in order to make
unit test failure debugging easier. The call may also be useful
for users of Check.
Support arbitrary tagging and selection of testcases.
A testcase can optionally have a list of tags associated with it.
Srunner can be run with an optional include list of tags and an optional
exclude list of tags. These will have the effect of filtering testcases
that would otherwise be run.