Commit graph

14 commits

Author SHA1 Message Date
Nirbheek Chauhan
0bb6d590cc libcheck: port to latest check git
Upstream seems to have stopped doing releases, but we need to update for better
Windows and Visual Studio support.

This patch only updates the libcheck sources and ignores the compatibility
sources for now.

https://bugzilla.gnome.org/show_bug.cgi?id=775870
2016-12-09 15:31:01 +05:30
Sebastian Dröge
805684585e check: Fix uninitialized variable compiler warning with gcc
check_run.c: In function 'sig_handler':
check_run.c:127:13: warning: 'child_sig' may be used uninitialized in this function [-Wmaybe-uninitialized]
             killpg(group_pid, child_sig);
             ^
check_run.c:130:31: warning: 'idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
             sigaction(sig_nr, &old_action[idx], NULL);
                               ^
2015-03-21 19:37:30 +01:00
Sebastian Dröge
7646cef644 check: Catch SIGTERM and SIGINT in the test runner and kill all currently running tests
Otherwise e.g. ctrl+c in the test runner exits the test runner, while the test
itself is still running in the background, uses CPU and memory and potentially
never exits (e.g. if the test ran into a deadlock or infinite loop).

The reason why we have to manually kill the actual tests is that after
forking they will be moved to their own process group, and as such are
not receiving any signals sent to the test runner anymore. This is supposed
to be done to make it easier to kill a test, which it only really does if
the test itself is forking off new processes.

This fix is not complete though. SIGKILL can't be caught at all, and error
signals like SIGSEGV, SIGFPE are currently not caught. The latter will only
happen if there is a bug in the test runner itself, and as such seem less
important.
2015-03-21 15:19:43 +01:00
Luis de Bethencourt
58f9c1dd71 check: duplicate code branches
CID #1226446
2015-03-10 16:42:48 +00:00
Sebastian Rasmussen
0b09573bbe check: Have autotools generate internal-check.h
Previously GStreamer got access to the libcheck interface by including
libs/gst/check/check.h which in turn included internal-check.h in the
same directory. internal-check.h was generated by copying
libs/gst/check/libcheck/check.h which in turn was generated from
check.h.in in the same directory. In this case generating
libs/gst/check/libcheck/check.h is unnecessary, in addition this file
was accidentally distributed in generated project tarballs.

Now libs/gst/check/internal-check.h is generated directly from
libs/gst/check/libcheck/check.h.in by configure. This means that the
libcheck source must include internal-check.h instead of the previously
generated libs/gst/check/libcheck/check.h. However the unnecessary
intermediate step is now skipped.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=741359
2014-12-16 16:32:39 +01:00
Sebastian Rasmussen
85c8b5d2c4 check: Apply GStreamer-specific patches
Reintroduced patches:

 * Make sure that fail_if(1) actually fails
   from commit 9f99d056a2

New patches due to updated libcheck (based on 0.9.14):

 * Checks in m4/check-checks.m4 to cater for new dependencies
 * Conditional compile-time compat POSIX fallbacks for libcheck
 * Avoid relative paths for libcheck header files
 * Make timer_create() usage depend on posix timers, not librt
 * Rely on default AX_PTHREAD behavior to allow HAVE_PTHREAD to be used
   when checking for types and functions (like clock_gettime())
 * Avoid double declaration of clock_gettime() when availabe outside of
   librt by making compat clock_gettime() declaration conditional
 * check 0.9.9 renamed _fail_unless() and 0.9.12 later renamed it again
   to _ck_assert_failed(), so ASSERT_{CRITICAL,WARNING}() now calls this
   function
 * Remove libcheck fallback infrastructure for malloc(), realloc(),
   gettimeofday() and snprintf() since either they appear to be
   available or they introduce even more dependencies.

The result is an embedded check in gstreamer that has been tested by
running check tests in core, -base, -good, -bad, -ugly and rtsp-server
on Linux, OSX and Windows.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=727826
2014-12-06 17:48:25 +01:00
Sebastian Rasmussen
f1df7aba8f check: Import version 0.9.14
This lifts the files almost verbatim (the changes being running though
gst-indent and fixing the FSF address) from the upstream respository.
Therefore this commit reverts some GStreamer-specific patches to check
that will be reintroduced next.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=727826
2014-12-06 17:48:16 +01:00
Tim-Philipp Müller
8924782dd4 Revert "check: only call setpgid on valid child PIDs"
This reverts commit b9313afc75.

This should be fixed in upstream libcheck instead. We want
to keep diff of our local copy to upstream libcheck
to a minimum.
2014-04-07 17:47:30 +01:00
Vincent Penquerc'h
b9313afc75 check: only call setpgid on valid child PIDs
Coverity 206186
2014-04-07 15:40:45 +01:00
Tim-Philipp Müller
666c8c11c6 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 20:44:48 +00:00
Руслан Ижбулатов
e08cb58aa8 check: patch internal check copy so it works with our build system
Fixes #604565.
2009-12-19 14:12:09 +00:00
Tim-Philipp Müller
8e5f17d07f check: update internal libcheck to 0.9.8 2009-12-17 21:18:41 +00:00
Edward Hervey
bf3ab71a2b libs/gst/check: Run gst-indent on libcheck. 2009-10-12 13:49:35 +02:00
Tim-Philipp Müller
a209779f1c check: add internal copy of check-0.9.6
Not hooked up yet. See #577275.
2009-08-06 14:26:32 +01:00