summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan van Berkom <tristan@codethink.co.uk>2020-10-25 18:11:54 +0900
committerTristan van Berkom <tristan@codethink.co.uk>2020-10-25 18:11:54 +0900
commitf2579bea17ed4660b1e06f584c62bad3ec3fcaf0 (patch)
treed891c724b6f9ebce473149f63d97488030575e44
parentd164ae319fced1e41ce5978a90c2bd64983cb54e (diff)
downloadbuildstream-f2579bea17ed4660b1e06f584c62bad3ec3fcaf0.tar.gz
tests/internals/storage_vdir_import.py: Conditionally skip
Conditionally skip tests which require subsecond mtime precision.
-rw-r--r--tests/internals/storage_vdir_import.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/internals/storage_vdir_import.py b/tests/internals/storage_vdir_import.py
index ffd727ffe..ff2b14026 100644
--- a/tests/internals/storage_vdir_import.py
+++ b/tests/internals/storage_vdir_import.py
@@ -24,6 +24,7 @@ from buildstream.storage._filebaseddirectory import FileBasedDirectory
from buildstream._cas import CASCache
from buildstream.storage.directory import VirtualDirectoryError
from buildstream.utils import _set_file_mtime, _parse_timestamp
+from buildstream.testing._utils.site import have_subsecond_mtime
# These are comparitive tests that check that FileBasedDirectory and
@@ -185,6 +186,12 @@ def directory_not_empty(path):
def _import_test(tmpdir, original, overlay, generator_function, verify_contents=False):
+
+ # Skip this test if we do not have support for subsecond precision mtimes
+ #
+ if not have_subsecond_mtime(str(tmpdir)):
+ pytest.skip("Filesystem does not support subsecond mtime precision: {}".format(str(tmpdir)))
+
cas_cache = CASCache(tmpdir, log_directory=os.path.join(tmpdir, "logs"))
try:
# Create some fake content