summaryrefslogtreecommitdiff
path: root/test/Copy-Symlinks.py
diff options
context:
space:
mode:
authorWilliam Blevins <wblevins@gmail.com>2014-08-27 21:14:22 -0400
committerWilliam Blevins <wblevins@gmail.com>2014-08-27 21:14:22 -0400
commit48f578bce63dca3594c2c5c2c3468daa5400fdd1 (patch)
tree8ea621760a9236a5ac1fc66e88f25d9944d027f5 /test/Copy-Symlinks.py
parent25f9d79f263747f84b5ac943be656997544a7aa3 (diff)
downloadscons-48f578bce63dca3594c2c5c2c3468daa5400fdd1.tar.gz
Issue 2395: Updated tests to be skipped on systems without os.symlink functionality.
Apparently, the SConsTest.symlink behavior doesn't give any success/fail feedback.
Diffstat (limited to 'test/Copy-Symlinks.py')
-rw-r--r--test/Copy-Symlinks.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/Copy-Symlinks.py b/test/Copy-Symlinks.py
index f8f92d74..35e4aa0e 100644
--- a/test/Copy-Symlinks.py
+++ b/test/Copy-Symlinks.py
@@ -36,6 +36,9 @@ import TestSCons
import SCons.Defaults
SCons.Defaults.DefaultEnvironment( tools = [] )
+if not hasattr(os, 'symlink'):
+ test.skip_test('No os.symlink() method, no symlinks to test.\n')
+
test = TestSCons.TestSCons()
filelinkToCopy = 'filelinkToCopy'
@@ -48,13 +51,10 @@ treelinkToCopy = 'treelinkToCopy'
badToLink = 'None' # do not write this item
badlinkToCopy = 'badlinkToCopy'
-try:
- test.symlink( fileToLink, filelinkToCopy )
- test.symlink( dirToLink, dirlinkToCopy )
- test.symlink( treeToLink, treelinkToCopy )
- test.symlink( badToLink, badlinkToCopy )
-except:
- test.no_result()
+test.symlink( fileToLink, filelinkToCopy )
+test.symlink( dirToLink, dirlinkToCopy )
+test.symlink( treeToLink, treelinkToCopy )
+test.symlink( badToLink, badlinkToCopy )
test.write( fileToLink, fileContents )
test.subdir( dirToLink )