diff options
author | Steven Knight <knight@baldmt.com> | 2005-04-01 22:58:50 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2005-04-01 22:58:50 (GMT) |
commit | ebcc7ec5e9125cd6f69cb97df5991015239f5197 (patch) | |
tree | 57e7a2d7d0628b81827df9b05e1cfeafff1c0b04 /src/engine/SCons/ExecutorTests.py | |
parent | 71bf8f38553cdaf3a70937b56668f9dfd2d82476 (diff) | |
download | SCons-ebcc7ec5e9125cd6f69cb97df5991015239f5197.zip SCons-ebcc7ec5e9125cd6f69cb97df5991015239f5197.tar.gz SCons-ebcc7ec5e9125cd6f69cb97df5991015239f5197.tar.bz2 |
Store source file and dependency paths relative to the target's directory, not relative to the top-level SConstruct directory.
Diffstat (limited to 'src/engine/SCons/ExecutorTests.py')
-rw-r--r-- | src/engine/SCons/ExecutorTests.py | 51 |
1 files changed, 32 insertions, 19 deletions
diff --git a/src/engine/SCons/ExecutorTests.py b/src/engine/SCons/ExecutorTests.py index 62c1eab..9ff30e5 100644 --- a/src/engine/SCons/ExecutorTests.py +++ b/src/engine/SCons/ExecutorTests.py @@ -358,28 +358,41 @@ class ExecutorTestCase(unittest.TestCase): missing = x.get_missing_sources() assert missing == [sources[0]], missing - def test_get_source_binfo(self): - """Test fetching the build signature info for the sources""" + def test_get_unignored_sources(self): + """Test fetching the unignored source list""" env = MyEnvironment() - 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 == ([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 + s3 = MyNode('s3') + x = SCons.Executor.Executor('b', env, [{}], [], [s1, s2, s3]) + + r = x.get_unignored_sources([]) + assert r == [s1, s2, s3], map(str, r) + + r = x.get_unignored_sources([s2]) + assert r == [s1, s3], map(str, r) + + r = x.get_unignored_sources([s1, s3]) + assert r == [s2], map(str, r) + + def test_process_sources(self): + """Test processing the source list through a function""" + env = MyEnvironment() + s1 = MyNode('s1') + s2 = MyNode('s2') + s3 = MyNode('s3') + x = SCons.Executor.Executor('b', env, [{}], [], [s1, s2, s3]) + + r = x.process_sources(str) + assert r == ['s1', 's2', 's3'], r + + r = x.process_sources(str, [s2]) + assert r == ['s1', 's3'], r + + def xxx(x): + return 'xxx-' + str(x) + r = x.process_sources(xxx, [s1, s3]) + assert r == ['xxx-s2'], r |