Răsfoiți Sursa

Fix test_sparse_file for solaris

jenkins 9 ani în urmă
părinte
comite
b86775ab4f
1 a modificat fișierele cu 3 adăugiri și 2 ștergeri
  1. 3 2
      src/borg/testsuite/archiver.py

+ 3 - 2
src/borg/testsuite/archiver.py

@@ -408,8 +408,9 @@ class ArchiverTestCase(ArchiverTestCaseBase):
             return repository.id
 
     def test_sparse_file(self):
-        # no sparse file support on Mac OS X
-        sparse_support = sys.platform != 'darwin'
+        # Mac OS X has no sparse file support
+        # Solaris (ZFS) has sparse file support, but is less predictable about it
+        sparse_support = sys.platform not in ['darwin', 'sunos5']
         filename = os.path.join(self.input_path, 'sparse')
         content = b'foobar'
         hole_size = 5 * (1 << CHUNK_MAX_EXP)  # 5 full chunker buffers