Browse Source

Fix fuse tests when flags are available

e.g. fuse installed, TMPDIR != tmpfs
Marian Beermann 9 years ago
parent
commit
e7523b7d46
1 changed files with 6 additions and 0 deletions
  1. 6 0
      borg/testsuite/archiver.py

+ 6 - 0
borg/testsuite/archiver.py

@@ -1255,6 +1255,9 @@ class ArchiverTestCase(ArchiverTestCaseBase):
         try:
         try:
             self.cmd('mount', self.repository_location, mountpoint, fork=True)
             self.cmd('mount', self.repository_location, mountpoint, fork=True)
             self.wait_for_mount(mountpoint)
             self.wait_for_mount(mountpoint)
+            if has_lchflags:
+                # remove the file we did not backup, so input and output become equal
+                os.remove(os.path.join('input', 'flagfile'))
             self.assert_dirs_equal(self.input_path, os.path.join(mountpoint, 'archive', 'input'))
             self.assert_dirs_equal(self.input_path, os.path.join(mountpoint, 'archive', 'input'))
             self.assert_dirs_equal(self.input_path, os.path.join(mountpoint, 'archive2', 'input'))
             self.assert_dirs_equal(self.input_path, os.path.join(mountpoint, 'archive2', 'input'))
         finally:
         finally:
@@ -1276,6 +1279,9 @@ class ArchiverTestCase(ArchiverTestCaseBase):
         try:
         try:
             self.cmd('mount', self.repository_location + '::archive', mountpoint, fork=True)
             self.cmd('mount', self.repository_location + '::archive', mountpoint, fork=True)
             self.wait_for_mount(mountpoint)
             self.wait_for_mount(mountpoint)
+            if has_lchflags:
+                # remove the file we did not backup, so input and output become equal
+                os.remove(os.path.join('input', 'flagfile'))
             self.assert_dirs_equal(self.input_path, os.path.join(mountpoint, 'input'))
             self.assert_dirs_equal(self.input_path, os.path.join(mountpoint, 'input'))
         finally:
         finally:
             if sys.platform.startswith('linux'):
             if sys.platform.startswith('linux'):