diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am b/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am index 0d9fee967b..80a4054a2d 100644 --- a/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am @@ -55,3 +55,6 @@ check-local: chmod 0600 $(abs_srcdir)/$$f; \ done +# Make the special temp dir for some written connections + mkdir -p $(abs_builddir)/tmp + diff --git a/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c index 3241ebbd98..1d3b8d44a7 100644 --- a/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c +++ b/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c @@ -4343,9 +4343,12 @@ test_read_write_static_routes_legacy (void) NM_SETTING_IP4_CONFIG_SETTING_NAME, NM_SETTING_IP4_CONFIG_NEVER_DEFAULT); - /* Save the ifcfg */ + /* Save the ifcfg; use a special different scratch dir to ensure that + * we can clean up after the written connection in both the original + * source tree and for 'make distcheck'. + */ success = writer_new_connection (connection, - TEST_SCRATCH_DIR "/network-scripts/", + TEST_SCRATCH_DIR "/network-scripts/tmp", &testfile, &error); ASSERT (success == TRUE,