diff options
author | William Deegan <bill@baddogconsulting.com> | 2019-02-27 14:41:06 -0800 |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2019-02-27 14:41:06 -0800 |
commit | e863e1bc71aea05c554e6d06014b51c19f5a6bf5 (patch) | |
tree | 1e560a7b92fdb5b7b0f18cbe8c1ee573f42ed5c1 /test/Configure | |
parent | 334e11d04bb3be2f0ed93f929548e6cdc84c3158 (diff) | |
download | scons-git-e863e1bc71aea05c554e6d06014b51c19f5a6bf5.tar.gz |
Add test for GH Issue #3303
Diffstat (limited to 'test/Configure')
-rw-r--r-- | test/Configure/option--config.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Configure/option--config.py b/test/Configure/option--config.py index 80a8bcd97..02f10cee5 100644 --- a/test/Configure/option--config.py +++ b/test/Configure/option--config.py @@ -122,6 +122,9 @@ test.checkLogAndStdout(["Checking for C header file non_system_header0.h... ", [((".c", CR), (_obj, NCR))]], "config.log", ".sconf_temp", "SConstruct") + +test.file_fixture('test_main.c') + # Check the combination of --config=force and Decider('MD5-timestamp') # On second run there was an issue where the decider would throw DeciderNeedsNode # exception which the configure code didn't handle. @@ -132,12 +135,19 @@ env.Decider('MD5-timestamp') conf = Configure(env) conf.TryLink('int main(){return 0;}','.c') env = conf.Finish() +env.Program('test_main.c') """) test.run(arguments='--config=force') # On second run the sconsign is loaded and decider doesn't just indicate need to rebuild test.run(arguments='--config=force') test.must_not_contain(test.workpath('config.log'), "TypeError: 'NoneType' object is not callable", mode='r') +# Now check to check that test_main.c didn't rebuild on second run above. +# This fixes an issue where --config=force overwrites the Environments decider and is not reset when +# the configure context is done. +# https://github.com/SCons/scons/issues/3303 +test.fail_test(test.stdout().find('test_main.o') != -1) + test.pass_test() # Local Variables: |