-
-
Notifications
You must be signed in to change notification settings - Fork 391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: Don't use g_test_message before g_test_init #5355
Conversation
Meson will fail a test using TAP if the first line on stdout isn't the TAP version declaration.
This seems to be caused by changes to |
Upstream issue: https://gitlab.gnome.org/GNOME/glib/-/issues/2943 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change as written will cause TAP output formatting to be broken, as these messages will now be printed without a leading #
. If that’s something flatpak cares about, the PR will need reworking.
Can’t the test be changed to definitely call g_test_init()
first?
g_test_init() is meant to be called before any other use of GTest APIs, and isolated_test_dir_global_setup() can call g_test_message(). GLib 2.76 makes this more of a practical problem. (isolated_test_dir_global_setup() is essentially a reimplementation of G_TEST_OPTION_ISOLATE_DIRS, since we don't depend on GLib 2.60.) Alternative to flatpak#5355. Signed-off-by: Simon McVittie <smcv@collabora.com>
I think that's a better solution, though. #5358 |
g_test_init() is meant to be called before any other use of GTest APIs, and isolated_test_dir_global_setup() can call g_test_message(). GLib 2.76 makes this more of a practical problem. (isolated_test_dir_global_setup() is essentially a reimplementation of G_TEST_OPTION_ISOLATE_DIRS, since we don't depend on GLib 2.60.) Alternative to flatpak#5355. Signed-off-by: Simon McVittie <smcv@collabora.com>
I think #5358 is a better solution. |
g_test_init() is meant to be called before any other use of GTest APIs, and isolated_test_dir_global_setup() can call g_test_message(). GLib 2.76 makes this more of a practical problem. (isolated_test_dir_global_setup() is essentially a reimplementation of G_TEST_OPTION_ISOLATE_DIRS, since we don't depend on GLib 2.60.) Alternative to flatpak#5355. Signed-off-by: Simon McVittie <smcv@collabora.com>
g_test_init() is meant to be called before any other use of GTest APIs, and isolated_test_dir_global_setup() can call g_test_message(). GLib 2.76 makes this more of a practical problem. (isolated_test_dir_global_setup() is essentially a reimplementation of G_TEST_OPTION_ISOLATE_DIRS, since we don't depend on GLib 2.60.) Alternative to #5355. Signed-off-by: Simon McVittie <smcv@collabora.com>
g_test_init() is meant to be called before any other use of GTest APIs, and isolated_test_dir_global_setup() can call g_test_message(). GLib 2.76 makes this more of a practical problem. (isolated_test_dir_global_setup() is essentially a reimplementation of G_TEST_OPTION_ISOLATE_DIRS, since we don't depend on GLib 2.60.) Alternative to flatpak#5355. Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit a058d96)
Meson will fail a test using TAP if the first line on stdout isn't the TAP version declaration.