summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/Decider/content-timestamp-symlink.py3
-rw-r--r--testing/framework/TestSCons.py7
2 files changed, 9 insertions, 1 deletions
diff --git a/test/Decider/content-timestamp-symlink.py b/test/Decider/content-timestamp-symlink.py
index b448709..4e0c3b0 100644
--- a/test/Decider/content-timestamp-symlink.py
+++ b/test/Decider/content-timestamp-symlink.py
@@ -32,6 +32,9 @@ _python_ = TestSCons._python_
test = TestSCons.TestSCons()
+if not test.platform_has_symlink():
+ test.skip_test('Symbolic links not reliably available on this platform, skipping test.\n')
+
# a dummy "compiler" for the builder
test.write('build.py', r"""
import sys
diff --git a/testing/framework/TestSCons.py b/testing/framework/TestSCons.py
index 079e17d..ec82102 100644
--- a/testing/framework/TestSCons.py
+++ b/testing/framework/TestSCons.py
@@ -1665,7 +1665,12 @@ else:
alt_cpp_suffix = '.C'
return alt_cpp_suffix
- def platform_has_symlink(self):
+ def platform_has_symlink(self) -> bool:
+ """Retun an indication of whether symlink tests should be run.
+
+ Despite the name, we really mean "are they reliably usable"
+ rather than "do they exist" - basically the Windows case.
+ """
if not hasattr(os, 'symlink') or sys.platform == 'win32':
return False
else: