mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-19 21:59:17 +02:00
Change the g_error() to g_message() to avoid stopping on warnings. At
2008-02-20 Tor Lillqvist <tml@novell.com> * glib/gtestutils.c (g_test_trap_fork) [Win32]: Change the g_error() to g_message() to avoid stopping on warnings. At least now testglib runs to completion and the old tests in it get exercised even if the newfangled ones don't. (g_test_trap_assertions) [Win32]: Bypass on Windows. svn path=/trunk/; revision=6542
This commit is contained in:
parent
121f43e54d
commit
87d23f18ec
@ -1,3 +1,11 @@
|
|||||||
|
2008-02-20 Tor Lillqvist <tml@novell.com>
|
||||||
|
|
||||||
|
* glib/gtestutils.c (g_test_trap_fork) [Win32]: Change the
|
||||||
|
g_error() to g_message() to avoid stopping on warnings. At least
|
||||||
|
now testglib runs to completion and the old tests in it get
|
||||||
|
exercised even if the newfangled ones don't.
|
||||||
|
(g_test_trap_assertions) [Win32]: Bypass on Windows.
|
||||||
|
|
||||||
2008-02-17 Marco Barisione <marco@barisione.org>
|
2008-02-17 Marco Barisione <marco@barisione.org>
|
||||||
|
|
||||||
* glib/gregex.c: (translate_compile_error), (g_regex_new): Avoid some
|
* glib/gregex.c: (translate_compile_error), (g_regex_new): Avoid some
|
||||||
|
@ -1329,17 +1329,6 @@ g_string_write_out (GString *gstring,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
sane_dup2 (int fd1,
|
|
||||||
int fd2)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
do
|
|
||||||
ret = dup2 (fd1, fd2);
|
|
||||||
while (ret < 0 && errno == EINTR);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_trap_clear (void)
|
test_trap_clear (void)
|
||||||
{
|
{
|
||||||
@ -1351,6 +1340,19 @@ test_trap_clear (void)
|
|||||||
test_trap_last_stderr = NULL;
|
test_trap_last_stderr = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef G_OS_UNIX
|
||||||
|
|
||||||
|
static int
|
||||||
|
sane_dup2 (int fd1,
|
||||||
|
int fd2)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
do
|
||||||
|
ret = dup2 (fd1, fd2);
|
||||||
|
while (ret < 0 && errno == EINTR);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static guint64
|
static guint64
|
||||||
test_time_stamp (void)
|
test_time_stamp (void)
|
||||||
{
|
{
|
||||||
@ -1362,6 +1364,8 @@ test_time_stamp (void)
|
|||||||
return stamp;
|
return stamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_test_trap_fork:
|
* g_test_trap_fork:
|
||||||
* @usec_timeout: Timeout for the forked test in micro seconds.
|
* @usec_timeout: Timeout for the forked test in micro seconds.
|
||||||
@ -1404,6 +1408,8 @@ test_time_stamp (void)
|
|||||||
* }
|
* }
|
||||||
* ]|
|
* ]|
|
||||||
*
|
*
|
||||||
|
* This function is implemented only on Unix platforms.
|
||||||
|
*
|
||||||
* Returns: %TRUE for the forked child and %FALSE for the executing parent process.
|
* Returns: %TRUE for the forked child and %FALSE for the executing parent process.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
@ -1541,7 +1547,9 @@ g_test_trap_fork (guint64 usec_timeout,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
g_error ("Not implemented: g_test_trap_fork");
|
g_message ("Not implemented: g_test_trap_fork");
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1579,6 +1587,7 @@ g_test_trap_assertions (const char *domain,
|
|||||||
guint64 assertion_flags, /* 0-pass, 1-fail, 2-outpattern, 4-errpattern */
|
guint64 assertion_flags, /* 0-pass, 1-fail, 2-outpattern, 4-errpattern */
|
||||||
const char *pattern)
|
const char *pattern)
|
||||||
{
|
{
|
||||||
|
#ifdef G_OS_UNIX
|
||||||
gboolean must_pass = assertion_flags == 0;
|
gboolean must_pass = assertion_flags == 0;
|
||||||
gboolean must_fail = assertion_flags == 1;
|
gboolean must_fail = assertion_flags == 1;
|
||||||
gboolean match_result = 0 == (assertion_flags & 1);
|
gboolean match_result = 0 == (assertion_flags & 1);
|
||||||
@ -1611,6 +1620,7 @@ g_test_trap_assertions (const char *domain,
|
|||||||
g_assertion_message (domain, file, line, func, msg);
|
g_assertion_message (domain, file, line, func, msg);
|
||||||
g_free (msg);
|
g_free (msg);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user