From ade8f8c0aa199049d46d2b19a73964d9fd3c78ef Mon Sep 17 00:00:00 2001 From: William Blevins Date: Wed, 27 Aug 2014 21:14:22 -0400 Subject: 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. --- test/Copy-Symlinks.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/Copy-Symlinks.py b/test/Copy-Symlinks.py index f8f92d7..35e4aa0 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 ) -- cgit v0.12