From f69fb04cd08601d74d092de2806ef51f7b02fc6d Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 2 Aug 2018 13:56:27 +0200 Subject: [PATCH] ifcfg-rh/tests: regenerate .cexpected files with NM_TEST_REGENERATE=1 The tests already honored the environment variable $NMTST_IFCFG_RH_UPDATE_EXPECTED to indicate that the .cexpected files should be written by the tests. However, in the meantime, we instead use NM_TEST_REGENERATE=1 at various places for this purpose. Honor that flag as well. --- src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c index 8d4efbbfd1..67431c18a4 100644 --- a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c +++ b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c @@ -185,7 +185,8 @@ _assert_expected_content (NMConnection *connection, const char *filename, const if ( len_expectd != len_written || memcmp (content_expectd, content_written, len_expectd) != 0) { - if (g_getenv ("NMTST_IFCFG_RH_UPDATE_EXPECTED")) { + if ( g_getenv ("NMTST_IFCFG_RH_UPDATE_EXPECTED") + || nm_streq0 (g_getenv ("NM_TEST_REGENERATE"), "1")) { if (uuid) { gs_free char *search = g_strdup_printf ("UUID=%s\n", uuid); const char *s;