1
0
Fork 0

Set G_DEBUG=fatal-warnings in run-tests.sh

We want any run-time warnings to cause the conformance tests to fail.
We are currently setting G_DEBUG in test_utils_init and this would
previously cause the fatal-warnings debug option to be set. However
since commit 47444dac of glib this no longer works because the
environment variable is read in a magic constructor of libglib so it
is too late to try to set it there. This patch makes it also set it in
run-tests.sh to avoid the problem.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 95a6d962f5bc2f21bfcdb2f0bc6b55cfa28792b3)
This commit is contained in:
Neil Roberts 2013-06-20 18:24:58 +01:00
parent 2933423ca7
commit 3ccd22b9e0
2 changed files with 11 additions and 0 deletions

View file

@ -145,6 +145,9 @@ test_utils_init (TestFlags requirement_flags,
is_boolean_env_set ("V"))
cogl_test_is_verbose = TRUE;
/* NB: This doesn't have any effect since commit 47444dac of glib
* because the environment variable is read in a magic constructor
* so it is too late to set them here */
if (g_getenv ("G_DEBUG"))
{
char *debug = g_strconcat (g_getenv ("G_DEBUG"), ",fatal-warnings", NULL);

View file

@ -1,5 +1,13 @@
#!/bin/bash
if test -z "$G_DEBUG"; then
G_DEBUG=fatal-warnings
else
G_DEBUG="$G_DEBUG,fatal-warnings"
fi
export G_DEBUG
ENVIRONMENT_CONFIG=$1
shift