From a75dcfcd43f13ea7ca06f463b22ecb8b2ab5df7d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 19 Apr 2024 13:01:59 +1000 Subject: [PATCH] test: add some tracing to the svg validity test It's a bit hard to figure out from the CI logs what failed because they may be truncated. And for users not intimitely familiar with the test suite it's not that simple either so let's put in a bunch of trace stataments that should at least point to where things go wrong. --- test/test-tablet-svg-validity.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/test-tablet-svg-validity.c b/test/test-tablet-svg-validity.c index bb3b2d09d..fa1d7ee08 100644 --- a/test/test-tablet-svg-validity.c +++ b/test/test-tablet-svg-validity.c @@ -36,6 +36,9 @@ #include #include "libwacom.h" +#define trace(fmt, ...) \ + printf("%s: checking " fmt "\n", __func__, __VA_ARGS__) + static xmlNodePtr verify_has_sub (xmlNodePtr cur, char *sub) { @@ -79,12 +82,13 @@ class_found (gchar **classes, gchar *value) static void verify_has_class (xmlNodePtr cur, const gchar *expected) { - xmlChar *prop; gchar **classes_present; gchar **classes_expected; gchar **ptr; + trace("%s", expected); + prop = xmlGetProp (cur, (xmlChar *) "class"); g_assert (prop != NULL); g_assert (strlen((const char *) prop) > 0); @@ -109,6 +113,8 @@ check_button (xmlNodePtr cur, const WacomDevice *device, char button, gchar *typ xmlNodePtr node; WacomButtonFlags flags; + trace("%c %s", button, type); + /* Check ID */ sub = g_strdup_printf ("%s%c", type, button); node = verify_has_sub (cur, sub); @@ -132,6 +138,8 @@ check_touchstrip (xmlNodePtr cur, gchar *id) char *class; xmlNodePtr node; + trace("%s", id); + node = verify_has_sub (cur, id); g_assert (node != NULL); @@ -184,6 +192,8 @@ check_touchring (xmlNodePtr cur, gchar *id) char *class; xmlNodePtr node; + trace("%s", id); + node = verify_has_sub (cur, id); g_assert (node != NULL);