diff options
| author | Dirk Baechle <dl9obn@darc.de> | 2015-02-26 23:44:19 (GMT) |
|---|---|---|
| committer | Dirk Baechle <dl9obn@darc.de> | 2015-02-26 23:44:19 (GMT) |
| commit | 354388a26c7ff2ed69e4e34f41880e0e1bfb0cb1 (patch) | |
| tree | e4e8f3ef044c39a930235a39bb7301d35b0300ff /src/engine/SCons/Scanner | |
| parent | 8447a9187ac80c0a7e980510154542b49577ddaa (diff) | |
| download | SCons-354388a26c7ff2ed69e4e34f41880e0e1bfb0cb1.zip SCons-354388a26c7ff2ed69e4e34f41880e0e1bfb0cb1.tar.gz SCons-354388a26c7ff2ed69e4e34f41880e0e1bfb0cb1.tar.bz2 | |
- switching Node class and NodeInfo/Binfo to using slots
- memoizer subsystem now uses decorators instead of the metaclass approach
Diffstat (limited to 'src/engine/SCons/Scanner')
| -rw-r--r-- | src/engine/SCons/Scanner/CTests.py | 13 | ||||
| -rw-r--r-- | src/engine/SCons/Scanner/Dir.py | 2 | ||||
| -rw-r--r-- | src/engine/SCons/Scanner/FortranTests.py | 13 | ||||
| -rw-r--r-- | src/engine/SCons/Scanner/IDLTests.py | 13 |
4 files changed, 22 insertions, 19 deletions
diff --git a/src/engine/SCons/Scanner/CTests.py b/src/engine/SCons/Scanner/CTests.py index 6418754..9c7df12 100644 --- a/src/engine/SCons/Scanner/CTests.py +++ b/src/engine/SCons/Scanner/CTests.py @@ -270,17 +270,18 @@ class CScannerTestCase5(unittest.TestCase): path = s.path(env) n = env.File('f3.cpp') - def my_rexists(s=n): - s.rexists_called = 1 - return s.old_rexists() - setattr(n, 'old_rexists', n.rexists) - setattr(n, 'rexists', my_rexists) + def my_rexists(s): + s.Tag('rexists_called', 1) + return SCons.Node._rexists_map[s.GetTag('old_rexists')](s) + n.Tag('old_rexists', n._func_rexists) + SCons.Node._rexists_map[3] = my_rexists + n._func_rexists = 3 deps = s(n, env, path) # Make sure rexists() got called on the file node being # scanned, essential for cooperation with VariantDir functionality. - assert n.rexists_called + assert n.GetTag('rexists_called') headers = ['f1.h', 'f2.h', 'f3-test.h', 'd1/f1.h', 'd1/f2.h', 'd1/f3-test.h'] diff --git a/src/engine/SCons/Scanner/Dir.py b/src/engine/SCons/Scanner/Dir.py index 1cecfb7..cbfb6fb 100644 --- a/src/engine/SCons/Scanner/Dir.py +++ b/src/engine/SCons/Scanner/Dir.py @@ -77,7 +77,7 @@ def scan_on_disk(node, env, path=()): that and then call the in-memory scanning function. """ try: - flist = node.fs.listdir(node.abspath) + flist = node.fs.listdir(node.get_abspath()) except (IOError, OSError): return [] e = node.Entry diff --git a/src/engine/SCons/Scanner/FortranTests.py b/src/engine/SCons/Scanner/FortranTests.py index 252da64..aaefa79 100644 --- a/src/engine/SCons/Scanner/FortranTests.py +++ b/src/engine/SCons/Scanner/FortranTests.py @@ -356,17 +356,18 @@ class FortranScannerTestCase9(unittest.TestCase): path = s.path(env) n = env.File('fff3.f') - def my_rexists(s=n): - s.rexists_called = 1 - return s.old_rexists() - setattr(n, 'old_rexists', n.rexists) - setattr(n, 'rexists', my_rexists) + def my_rexists(s): + s.Tag('rexists_called', 1) + return SCons.Node._rexists_map[s.GetTag('old_rexists')](s) + n.Tag('old_rexists', n._func_rexists) + SCons.Node._rexists_map[3] = my_rexists + n._func_rexists = 3 deps = s(n, env, path) # Make sure rexists() got called on the file node being # scanned, essential for cooperation with VariantDir functionality. - assert n.rexists_called + assert n.GetTag('rexists_called') headers = ['d1/f3.f', 'f3.f'] deps_match(self, deps, headers) diff --git a/src/engine/SCons/Scanner/IDLTests.py b/src/engine/SCons/Scanner/IDLTests.py index 675c70c..227799e 100644 --- a/src/engine/SCons/Scanner/IDLTests.py +++ b/src/engine/SCons/Scanner/IDLTests.py @@ -290,17 +290,18 @@ class IDLScannerTestCase5(unittest.TestCase): path = s.path(env) n = env.File('t3.idl') - def my_rexists(s=n): - s.rexists_called = 1 - return s.old_rexists() - setattr(n, 'old_rexists', n.rexists) - setattr(n, 'rexists', my_rexists) + def my_rexists(s): + s.Tag('rexists_called', 1) + return SCons.Node._rexists_map[s.GetTag('old_rexists')](s) + n.Tag('old_rexists', n._func_rexists) + SCons.Node._rexists_map[3] = my_rexists + n._func_rexists = 3 deps = s(n, env, path) # Make sure rexists() got called on the file node being # scanned, essential for cooperation with VariantDir functionality. - assert n.rexists_called + assert n.GetTag('rexists_called') headers = ['d1/f1.idl', 'd1/f2.idl', 'f1.idl', 'f2.idl', 'f3-test.idl', |
