diff options
author | Michał Górny <mgorny@gentoo.org> | 2018-02-22 16:13:10 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2018-02-22 16:14:25 +0100 |
commit | b37b4010a5f3569e8379360662a925ba04a886bf (patch) | |
tree | 12ba1245be9b953425dce573bdf63f4f32883bec /tests/test_recursiveloader.py | |
parent | 27bab8dd60d200e1240cc068b4239b994ffc2f49 (diff) | |
download | gemato-b37b4010a5f3569e8379360662a925ba04a886bf.tar.gz |
tests: Assert for /proc being a mountpoint for cross-fs tests
Skip cross-fs tests if /proc is not a mountpoint. This handles cases
when /proc exists but is not mounted which is quite normal
e.g. on Gentoo/FreeBSD.
Diffstat (limited to 'tests/test_recursiveloader.py')
-rw-r--r-- | tests/test_recursiveloader.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_recursiveloader.py b/tests/test_recursiveloader.py index 019c29f..ae757f2 100644 --- a/tests/test_recursiveloader.py +++ b/tests/test_recursiveloader.py @@ -1548,6 +1548,8 @@ DATA sub/version 0 MD5 d41d8cd98f00b204e9800998ecf8427e } def setUp(self): + if not os.path.ismount('/proc'): + raise unittest.SkipTest('/proc is not a mountpoint') super(CrossDeviceManifestTest, self).setUp() os.symlink('/proc', os.path.join(self.dir, 'sub')) @@ -1593,6 +1595,8 @@ class CrossDeviceEmptyManifestTest(TempDirTestCase): } def setUp(self): + if not os.path.ismount('/proc'): + raise unittest.SkipTest('/proc is not a mountpoint') super(CrossDeviceEmptyManifestTest, self).setUp() os.symlink('/proc', os.path.join(self.dir, 'sub')) @@ -1633,6 +1637,8 @@ IGNORE sub } def setUp(self): + if not os.path.ismount('/proc'): + raise unittest.SkipTest('/proc is not a mountpoint') super(CrossDeviceIgnoreManifestTest, self).setUp() os.symlink('/proc', os.path.join(self.dir, 'sub')) |