diff options
author | William Deegan <bill@baddogconsulting.com> | 2019-02-28 21:37:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-28 21:37:59 (GMT) |
commit | 1292c3f8c0a652c301ca5407de59b85b54011cfb (patch) | |
tree | d5e4e55475d23b27d05531a6565bcae996fd2cb4 /test | |
parent | 7a32722522e2f76df8886721db3648b69cec4ce1 (diff) | |
parent | 2ea6b7a551620c56f61a5dd9a9c94e342993795e (diff) | |
download | SCons-1292c3f8c0a652c301ca5407de59b85b54011cfb.zip SCons-1292c3f8c0a652c301ca5407de59b85b54011cfb.tar.gz SCons-1292c3f8c0a652c301ca5407de59b85b54011cfb.tar.bz2 |
Merge pull request #3313 from bdbaddog/fix_gh_3303_force_config_alters_env_decider
Fix issue #3303 - --config=force overwriting environment passed to Configure()
Diffstat (limited to 'test')
-rw-r--r-- | test/Configure/option--config.py | 10 | ||||
-rw-r--r-- | test/fixture/test_main.c | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/test/Configure/option--config.py b/test/Configure/option--config.py index 80a8bcd..02f10ce 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: diff --git a/test/fixture/test_main.c b/test/fixture/test_main.c new file mode 100644 index 0000000..adbe919 --- /dev/null +++ b/test/fixture/test_main.c @@ -0,0 +1,4 @@ +int main( int argc, char* argv[] ) +{ + return 0; +} |