mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-16 07:20:39 +01:00
ifcfg-rh: fix distcheck and tests after 9e93924cca
Since one test read in a file, wrote it out, and read it in again, we have to be careful of whether srcdir == builddir or not. If it doesn't, then we need to remove the written-out connection file. If it does, then we don't want to remove that written-out connection file because it's tracked by SCM. Avoid the whole problem by writing it out to a separate directory that we can always delete it from.
This commit is contained in:
parent
4274edf47d
commit
cbe313b447
2 changed files with 8 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue