From 34af68e356b20c2b01a61addca1d1d5d361cf558 Mon Sep 17 00:00:00 2001 From: Lukas Erlinghagen Date: Fri, 12 Jun 2009 16:30:31 +0000 Subject: - Changed the option--duplicate test to only test the number of hard links on systems that actually support it --- test/option--duplicate.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/option--duplicate.py b/test/option--duplicate.py index 642589e..7524c96 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', -- cgit v0.12