diff options
| author | Steven Knight <knight@baldmt.com> | 2005-02-14 03:22:34 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2005-02-14 03:22:34 (GMT) |
| commit | 08d7c4cd103fb39b6010b980209a777ceea1ead2 (patch) | |
| tree | 1fea16d051dcdb1147ced94deefb11fd31b151c5 /src/engine/SCons/Node/FSTests.py | |
| parent | 35451af4f3052befef3b41b3a971b3a8025b0577 (diff) | |
| download | SCons-08d7c4cd103fb39b6010b980209a777ceea1ead2.zip SCons-08d7c4cd103fb39b6010b980209a777ceea1ead2.tar.gz SCons-08d7c4cd103fb39b6010b980209a777ceea1ead2.tar.bz2 | |
Don't read up entire directories to decide if an Alias is up-to-date.
Diffstat (limited to 'src/engine/SCons/Node/FSTests.py')
| -rw-r--r-- | src/engine/SCons/Node/FSTests.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py index 2846f64..99a95b6 100644 --- a/src/engine/SCons/Node/FSTests.py +++ b/src/engine/SCons/Node/FSTests.py @@ -62,6 +62,8 @@ class Scanner: return self.hash def select(self, node): return self + def recurse_nodes(self, nodes): + return nodes class Environment: def __init__(self): @@ -1876,6 +1878,32 @@ class clearTestCase(unittest.TestCase): assert not f.rexists() assert str(f) == test.workpath('f'), str(f) +class disambiguateTestCase(unittest.TestCase): + def runTest(self): + """Test calling the disambiguate() method.""" + test = TestCmd(workdir='') + + fs = SCons.Node.FS.FS() + + ddd = fs.Dir('ddd') + d = ddd.disambiguate() + assert d is ddd, d + + fff = fs.File('fff') + f = fff.disambiguate() + assert f is fff, f + + test.subdir('edir') + test.write('efile', "efile\n") + + edir = fs.Entry(test.workpath('edir')) + d = edir.disambiguate() + assert d.__class__ is ddd.__class__, d.__class__ + + efile = fs.Entry(test.workpath('efile')) + f = efile.disambiguate() + assert f.__class__ is fff.__class__, f.__class__ + class postprocessTestCase(unittest.TestCase): def runTest(self): """Test calling the postprocess() method.""" @@ -2108,6 +2136,7 @@ if __name__ == "__main__": suite.addTest(SConstruct_dirTestCase()) suite.addTest(CacheDirTestCase()) suite.addTest(clearTestCase()) + suite.addTest(disambiguateTestCase()) suite.addTest(postprocessTestCase()) suite.addTest(SpecialAttrTestCase()) suite.addTest(SaveStringsTestCase()) |
