summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2019-02-01 22:59:28 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2019-02-02 18:22:08 (GMT)
commit2860462520f2e0ea0c5ccd5090fbefaef47e66e8 (patch)
tree4b6108a1f471063a5dda8cde28803602b482f586
parentbd2441310379b8009f1ebdc723ff23bb75cc3eb5 (diff)
downloadSCons-2860462520f2e0ea0c5ccd5090fbefaef47e66e8.zip
SCons-2860462520f2e0ea0c5ccd5090fbefaef47e66e8.tar.gz
SCons-2860462520f2e0ea0c5ccd5090fbefaef47e66e8.tar.bz2
Fix new test binary/text read issue for py3.5+. Changed mode to 'r' as just plain part of a line
-rw-r--r--test/Configure/option--config.py81
1 files changed, 39 insertions, 42 deletions
diff --git a/test/Configure/option--config.py b/test/Configure/option--config.py
index 09430d2..80a8bcd 100644
--- a/test/Configure/option--config.py
+++ b/test/Configure/option--config.py
@@ -39,9 +39,9 @@ test = TestSCons.TestSCons()
test.subdir('include')
NCR = test.NCR # non-cached rebuild
-CR = test.CR # cached rebuild (up to date)
+CR = test.CR # cached rebuild (up to date)
NCF = test.NCF # non-cached build failure
-CF = test.CF # cached build failure
+CF = test.CF # cached build failure
SConstruct_path = test.workpath('SConstruct')
@@ -70,36 +70,36 @@ scons: *** "%(conftest_0_c)s" is not yet built and cache is forced.
test.run(arguments='--config=cache', status=2, stderr=expect)
test.run(arguments='--config=auto')
-test.checkLogAndStdout( ["Checking for C header file non_system_header0.h... ",
- "Checking for C header file non_system_header1.h... "],
- ["yes", "no"],
- [[((".c", NCR), (_obj, NCR))],
- [((".c", NCR), (_obj, NCF))]],
- "config.log", ".sconf_temp", "SConstruct")
+test.checkLogAndStdout(["Checking for C header file non_system_header0.h... ",
+ "Checking for C header file non_system_header1.h... "],
+ ["yes", "no"],
+ [[((".c", NCR), (_obj, NCR))],
+ [((".c", NCR), (_obj, NCF))]],
+ "config.log", ".sconf_temp", "SConstruct")
test.run(arguments='--config=auto')
-test.checkLogAndStdout( ["Checking for C header file non_system_header0.h... ",
- "Checking for C header file non_system_header1.h... "],
- ["yes", "no"],
- [[((".c", CR), (_obj, CR))],
- [((".c", CR), (_obj, CF))]],
- "config.log", ".sconf_temp", "SConstruct")
+test.checkLogAndStdout(["Checking for C header file non_system_header0.h... ",
+ "Checking for C header file non_system_header1.h... "],
+ ["yes", "no"],
+ [[((".c", CR), (_obj, CR))],
+ [((".c", CR), (_obj, CF))]],
+ "config.log", ".sconf_temp", "SConstruct")
test.run(arguments='--config=force')
-test.checkLogAndStdout( ["Checking for C header file non_system_header0.h... ",
- "Checking for C header file non_system_header1.h... "],
- ["yes", "no"],
- [[((".c", NCR), (_obj, NCR))],
- [((".c", NCR), (_obj, NCF))]],
- "config.log", ".sconf_temp", "SConstruct")
+test.checkLogAndStdout(["Checking for C header file non_system_header0.h... ",
+ "Checking for C header file non_system_header1.h... "],
+ ["yes", "no"],
+ [[((".c", NCR), (_obj, NCR))],
+ [((".c", NCR), (_obj, NCF))]],
+ "config.log", ".sconf_temp", "SConstruct")
test.run(arguments='--config=cache')
-test.checkLogAndStdout( ["Checking for C header file non_system_header0.h... ",
- "Checking for C header file non_system_header1.h... "],
- ["yes", "no"],
- [[((".c", CR), (_obj, CR))],
- [((".c", CR), (_obj, CF))]],
- "config.log", ".sconf_temp", "SConstruct")
+test.checkLogAndStdout(["Checking for C header file non_system_header0.h... ",
+ "Checking for C header file non_system_header1.h... "],
+ ["yes", "no"],
+ [[((".c", CR), (_obj, CR))],
+ [((".c", CR), (_obj, CF))]],
+ "config.log", ".sconf_temp", "SConstruct")
test.write(['include', 'non_system_header1.h'], """
/* Another header */
@@ -107,21 +107,20 @@ test.write(['include', 'non_system_header1.h'], """
test.unlink(['include', 'non_system_header0.h'])
test.run(arguments='--config=cache')
-test.checkLogAndStdout( ["Checking for C header file non_system_header0.h... ",
- "Checking for C header file non_system_header1.h... "],
- ["yes", "no"],
- [[((".c", CR), (_obj, CR))],
- [((".c", CR), (_obj, CF))]],
- "config.log", ".sconf_temp", "SConstruct")
+test.checkLogAndStdout(["Checking for C header file non_system_header0.h... ",
+ "Checking for C header file non_system_header1.h... "],
+ ["yes", "no"],
+ [[((".c", CR), (_obj, CR))],
+ [((".c", CR), (_obj, CF))]],
+ "config.log", ".sconf_temp", "SConstruct")
test.run(arguments='--config=auto')
-test.checkLogAndStdout( ["Checking for C header file non_system_header0.h... ",
- "Checking for C header file non_system_header1.h... "],
- ["no", "yes"],
- [[((".c", CR), (_obj, NCF))],
- [((".c", CR), (_obj, NCR))]],
- "config.log", ".sconf_temp", "SConstruct")
-
+test.checkLogAndStdout(["Checking for C header file non_system_header0.h... ",
+ "Checking for C header file non_system_header1.h... "],
+ ["no", "yes"],
+ [[((".c", CR), (_obj, NCF))],
+ [((".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
@@ -137,9 +136,7 @@ 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.must_not_contain(test.workpath('config.log'), "TypeError: 'NoneType' object is not callable", mode='r')
test.pass_test()