From 372c0eb3edb15a3c115c08b40e66c7acbb5a72aa Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 25 Jun 2018 11:29:35 +0200 Subject: [PATCH] libnm-glib/tests: retry nm-client tests for libnm-glib They are known to be racy and occasionally break. Especially in cases where the system's CPU is busy, like during parallel `make check -j`. It's likely a bug in libnm-glib. libnm-glib is deprecated, and the library didn't significantly change now for several releases. Let's not invest effort into finding bugs in the deprecated library, bugs that are known to exist. Also, at this point, larger rework of libnm-glib is not going to happen anymore. Retry the test up to 5 times, trying to workaround the test failures. --- Makefile.am | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index 7eef51d38d..de88f38281 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4517,14 +4517,23 @@ libnm_glib_tests_cppflags = \ $(DBUS_CFLAGS) \ $(NULL) -libnm_glib_tests_programs_req_introspection = \ - libnm-glib/tests/test-nm-client \ - libnm-glib/tests/test-remote-settings-client +if HAVE_INTROSPECTION +check-local-libnm-glib-nm-client: libnm-glib/tests/test-nm-client + ( $(LOG_COMPILER) "$(builddir)/libnm-glib/tests/test-nm-client"; r="$$?"; test "$$r" = 0 -o "$$r" = 77 ) || \ + ( $(LOG_COMPILER) "$(builddir)/libnm-glib/tests/test-nm-client"; r="$$?"; test "$$r" = 0 -o "$$r" = 77 ) || \ + ( $(LOG_COMPILER) "$(builddir)/libnm-glib/tests/test-nm-client"; r="$$?"; test "$$r" = 0 -o "$$r" = 77 ) || \ + ( $(LOG_COMPILER) "$(builddir)/libnm-glib/tests/test-nm-client"; r="$$?"; test "$$r" = 0 -o "$$r" = 77 ) || \ + ( $(LOG_COMPILER) "$(builddir)/libnm-glib/tests/test-nm-client"; r="$$?"; test "$$r" = 0 -o "$$r" = 77 ) || \ + false + +check_local += check-local-libnm-glib-nm-client +endif +check_programs_norun += libnm-glib/tests/test-nm-client if HAVE_INTROSPECTION -check_programs += $(libnm_glib_tests_programs_req_introspection) +check_programs += libnm-glib/tests/test-remote-settings-client else -check_programs_norun += $(libnm_glib_tests_programs_req_introspection) +check_programs_norun += libnm-glib/tests/test-remote-settings-client endif libnm_glib_tests_test_nm_client_CPPFLAGS = $(libnm_glib_tests_cppflags)