From 15d275627e2a6ee154396e2768cb77aa82a7dd04 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Wed, 30 Jan 2019 13:32:38 -0800 Subject: Add test to check for configure calling configured decider not handling DeciderNeedsNode exception which can be thrown by MD5-Timestamp decider logic --- test/Configure/option--config.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/Configure/option--config.py b/test/Configure/option--config.py index 1f40a80..09430d2 100644 --- a/test/Configure/option--config.py +++ b/test/Configure/option--config.py @@ -122,6 +122,25 @@ test.checkLogAndStdout( ["Checking for C header file non_system_header0.h... ", [((".c", CR), (_obj, NCR))]], "config.log", ".sconf_temp", "SConstruct") + +# 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. +SConstruct_path = test.workpath('SConstruct') +test.write(SConstruct_path, """ +env = Environment() +env.Decider('MD5-timestamp') +conf = Configure(env) +conf.TryLink('int main(){return 0;}','.c') +env = conf.Finish() +""") +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") + + + test.pass_test() # Local Variables: -- cgit v0.12