diff options
author | Charles Brunet <charles.brunet@optelgroup.com> | 2023-06-14 10:09:53 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2023-06-16 02:11:02 -0400 |
commit | 92592015bb04bde1f36d46c53fe09ae38f678be8 (patch) | |
tree | efee7b31dbbe28c63503ae54de524ea0fbf054fd | |
parent | 64394fcbd65ab29a682d96a0280422ca8426cf0a (diff) | |
download | meson-92592015bb04bde1f36d46c53fe09ae38f678be8.zip meson-92592015bb04bde1f36d46c53fe09ae38f678be8.tar.gz meson-92592015bb04bde1f36d46c53fe09ae38f678be8.tar.bz2 |
unittests: skip test using symlink if not available
-rw-r--r-- | unittests/allplatformstests.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py index 6f91857..a57ca0c 100644 --- a/unittests/allplatformstests.py +++ b/unittests/allplatformstests.py @@ -4633,7 +4633,10 @@ class AllPlatformTests(BasePlatformTests): symlinked_subproject = os.path.join(testdir, 'subprojects', 'symlinked_subproject') if not os.path.exists(subproject_dir): os.mkdir(subproject_dir) - os.symlink(subproject, symlinked_subproject) + try: + os.symlink(subproject, symlinked_subproject) + except OSError: + raise SkipTest("Symlinks are not available on this machine") self.addCleanup(os.remove, symlinked_subproject) self.init(testdir) |