From: erluk Date: Fri, 12 Jun 2009 16:30:31 +0000 (+0000) Subject: - Changed the option--duplicate test to only test the number of hard links on systems... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=36930230325401618a3c6008c0e5e83b9a98d1e5;p=scons.git - Changed the option--duplicate test to only test the number of hard links on systems that actually support it git-svn-id: http://scons.tigris.org/svn/scons/trunk@4232 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/test/option--duplicate.py b/test/option--duplicate.py index 642589e5..7524c969 100644 --- a/test/option--duplicate.py +++ b/test/option--duplicate.py @@ -55,12 +55,24 @@ copy = 1 # should always work bss = test.workpath('build/SConscript') -criterion = { +criterion_hardlinks = { 'hard' : lambda nl, islink: nl == 2 and not islink, 'soft' : lambda nl, islink: nl == 1 and islink, 'copy' : lambda nl, islink: nl == 1 and not islink, } +criterion_no_hardlinks = { + 'hard' : lambda nl, islink: not islink, + 'soft' : lambda nl, islink: islink, + 'copy' : lambda nl, islink: not islink, +} + +# On systems without hard linking, it doesn't make sense to check ST_NLINK +if hard: + criterion = criterion_hardlinks +else: + criterion = criterion_no_hardlinks + description = { 'hard' : 'a hard link', 'soft' : 'a soft link',