diff options
author | William Deegan <bill@baddogconsulting.com> | 2025-01-20 22:14:31 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2025-01-20 22:14:31 (GMT) |
commit | 766de9c0159aefca76a41a999a3c579f3cf15e96 (patch) | |
tree | 6d17ff0b8c1324e15f9f8fb40d3dea8e91725cca /test | |
parent | 2e44ddac82ad44599f3c835165736680aa064d9a (diff) | |
download | SCons-766de9c0159aefca76a41a999a3c579f3cf15e96.zip SCons-766de9c0159aefca76a41a999a3c579f3cf15e96.tar.gz SCons-766de9c0159aefca76a41a999a3c579f3cf15e96.tar.bz2 |
Fix Issue #2281, post and pre actions were being ignored when added to an Alias() node, if there was no action specified when that node was created
Diffstat (limited to 'test')
-rw-r--r-- | test/Alias/action.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Alias/action.py b/test/Alias/action.py index ecff388..7eff1c7 100644 --- a/test/Alias/action.py +++ b/test/Alias/action.py @@ -69,6 +69,19 @@ env.Alias(['build-add2a', 'build-add2b'], action=foo) env.Alias('build-add3', f6) env.Alias('build-add3', action=foo) env.Alias('build-add3', action=bar) + + +f7 = env.Cat('f7.out', 'f6.in') +def build_it(target, source, env): + print("build_it: Goodbye") + return 0 + +def string_it(target, source, env): + return("string it: Goodbye") + +s = Action(build_it, string_it) +env.Alias('add_post_action', f7) +env.AddPostAction('add_post_action', s) """) test.write('f1.in', "f1.in 1\n") @@ -133,6 +146,9 @@ test.must_match('f6.out', "f6.in 1\n") test.must_match('foo', "foo(['build-add3'], ['f6.out'])\n") test.must_match('bar', "bar(['build-add3'], ['f6.out'])\n") +test.run(arguments = 'add_post_action') +test.must_contain_all(test.stdout(), 'string it: Goodbye') + test.pass_test() # Local Variables: |