diff options
author | Seppo Yli-Olli <seppo.yliolli@gmail.com> | 2020-11-02 17:51:18 +0200 |
---|---|---|
committer | Seppo Yli-Olli <seppo.yliolli@gmail.com> | 2020-11-02 18:48:59 +0200 |
commit | de613d3ac45e08967ff2e8db498137fa0c33eec6 (patch) | |
tree | dd43caa047bb94189843c40c768bba2c4dd92437 | |
parent | 5019673d1d7eea79d44f9e906e88943f7f5367d5 (diff) | |
download | buildstream-nanonyme/fix-tests.tar.gz |
Conditionally skip failing testnanonyme/fix-tests
-rw-r--r-- | tests/frontend/workspace.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py index aff3e15db..67a35ab0f 100644 --- a/tests/frontend/workspace.py +++ b/tests/frontend/workspace.py @@ -3,7 +3,7 @@ import pytest import shutil import subprocess from ruamel.yaml.comments import CommentedSet -from tests.testutils import cli, create_repo, ALL_REPO_KINDS +from tests.testutils import cli, create_repo, ALL_REPO_KINDS, site from buildstream import _yaml from buildstream._exceptions import ErrorDomain, LoadError, LoadErrorReason @@ -517,6 +517,9 @@ def test_detect_modifications(cli, tmpdir, datafiles, modification, strict): elif modification == 'removefile': os.remove(os.path.join(workspace, 'usr', 'bin', 'hello')) elif modification == 'modifyfile': + if not site.have_subsecond_mtime(tmpdir): + pytest.skip("Filesystem does not support subsecond mtime precision: {}".format(tmpdir)) + with open(os.path.join(workspace, 'usr', 'bin', 'hello'), 'w') as f: f.write('cookie') else: |