diff options
author | Steven Knight <knight@baldmt.com> | 2005-03-05 15:50:59 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2005-03-05 15:50:59 (GMT) |
commit | f7230b12d84220342c2671276beec9a9d590ce22 (patch) | |
tree | b79cffeaf872e0fe23c37fd6dd0b670e8e14e953 /src/engine/SCons/ExecutorTests.py | |
parent | 81e49da9da4df0dab0041dbc2d499048f38ed4f4 (diff) | |
download | SCons-f7230b12d84220342c2671276beec9a9d590ce22.zip SCons-f7230b12d84220342c2671276beec9a9d590ce22.tar.gz SCons-f7230b12d84220342c2671276beec9a9d590ce22.tar.bz2 |
Reduce gen_binfo() time for very long source lists.
Diffstat (limited to 'src/engine/SCons/ExecutorTests.py')
-rw-r--r-- | src/engine/SCons/ExecutorTests.py | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/engine/SCons/ExecutorTests.py b/src/engine/SCons/ExecutorTests.py index d3af914..d16b137 100644 --- a/src/engine/SCons/ExecutorTests.py +++ b/src/engine/SCons/ExecutorTests.py @@ -340,12 +340,25 @@ class ExecutorTestCase(unittest.TestCase): def test_get_source_binfo(self): """Test fetching the build signature info for the sources""" env = MyEnvironment() - targets = [MyNode('t')] - sources = [MyNode('s1'), MyNode('s2')] - x = SCons.Executor.Executor('b', env, [{}], targets, sources) + t1 = MyNode('t') + s1 = MyNode('s1') + s2 = MyNode('s2') + x = SCons.Executor.Executor('b', env, [{}], [t1], [s1, s2]) + b = x.get_source_binfo('C') - assert b == [(sources[0], 'cs-C-s1', 's1'), - (sources[1], 'cs-C-s2', 's2')], b + assert b == ([s1, s2], + ['cs-C-s1', 'cs-C-s2'], + ['s1', 's2']), b + + b = x.get_source_binfo('C', [s1]) + assert b == ([s2], + ['cs-C-s2'], + ['s2']), b + + b = x.get_source_binfo('C', [s2]) + assert b == ([s1], + ['cs-C-s1'], + ['s1']), b |