Compare commits

...

2 Commits

Author SHA1 Message Date
Matthias Clasen
bf1abac977 ci: Use catchsegv catching stacktraces
Seems better than patching backtrace() calls into
our test binaries.
2020-08-27 14:33:01 -04:00
Matthias Clasen
1a9edecdb4 Revert "reftest: get backtraces"
This reverts commit 7233a70d47.
2020-08-27 14:33:01 -04:00
2 changed files with 3 additions and 52 deletions

View File

@@ -17,6 +17,7 @@ case "${backend}" in
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
--print-errorlogs \
--setup=${backend} \
--wrap catchsegv \
--suite=gtk \
--no-suite=gsk-compare-broadway
@@ -36,6 +37,7 @@ case "${backend}" in
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
--print-errorlogs \
--setup=${backend} \
--wrap catchsegv \
--suite=gtk \
--no-suite=gsk-compare-broadway
@@ -54,6 +56,7 @@ case "${backend}" in
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
--print-errorlogs \
--setup=${backend} \
--wrap catchsegv \
--suite=gtk \
--no-suite=gsk-compare-opengl

View File

@@ -24,9 +24,6 @@
#include "reftest-module.h"
#include "reftest-snapshot.h"
#ifndef G_OS_WIN32
#include <execinfo.h>
#endif
#include <string.h>
#include <glib/gstdio.h>
#include <gtk/gtk.h>
@@ -400,53 +397,6 @@ add_test_for_file (GFile *file)
g_list_free_full (files, g_object_unref);
}
static GLogWriterOutput
log_writer (GLogLevelFlags log_level,
const GLogField *fields,
gsize n_fields,
gpointer user_data)
{
#ifndef G_OS_WIN32
if (log_level & G_LOG_LEVEL_CRITICAL)
{
void *buffer[1024];
int size, i;
char **symbols;
GString *s;
GLogField *my_fields;
my_fields = g_alloca (sizeof (GLogField) * n_fields);
s = g_string_new ("");
size = backtrace (buffer, 1024);
symbols = backtrace_symbols (buffer, size);
for (i = 0; i < size; i++)
{
g_string_append (s, symbols[i]);
g_string_append_c (s, '\n');
}
free (symbols);
for (i = 0; i < n_fields; i++)
{
my_fields[i] = fields[i];
if (strcmp (fields[i].key, "MESSAGE") == 0)
{
my_fields[i].value = g_strconcat (fields[i].value, "\nBacktrace:\n", s->str, NULL);
my_fields[i].length = strlen (my_fields[i].value);
}
}
g_string_free (s, TRUE);
fields = my_fields;
}
#endif
return g_log_writer_standard_streams (log_level, fields, n_fields, user_data);
}
int
main (int argc, char **argv)
{
@@ -497,8 +447,6 @@ main (int argc, char **argv)
*/
chdir (basedir);
g_log_set_writer_func (log_writer, NULL, NULL);
result = g_test_run ();
if (using_tap)