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.
This commit is contained in:
Thomas Haller 2018-08-02 13:56:27 +02:00
parent 09031978bb
commit f69fb04cd0

View file

@ -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;