From 92592015bb04bde1f36d46c53fe09ae38f678be8 Mon Sep 17 00:00:00 2001 From: Charles Brunet Date: Wed, 14 Jun 2023 10:09:53 -0400 Subject: unittests: skip test using symlink if not available --- unittests/allplatformstests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- cgit v1.1