summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-03-14 20:28:22 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2017-03-14 20:28:22 (GMT)
commitd2bd5c35b04a70cc4778bdf3fb7b1c9cc48cb2cb (patch)
treed92dce5ae47a87aae9f6c554fc14531392f4364b
parentdd25c86b45c6cdf9cce4107c33464ec46a80dc58 (diff)
downloadSCons-d2bd5c35b04a70cc4778bdf3fb7b1c9cc48cb2cb.zip
SCons-d2bd5c35b04a70cc4778bdf3fb7b1c9cc48cb2cb.tar.gz
SCons-d2bd5c35b04a70cc4778bdf3fb7b1c9cc48cb2cb.tar.bz2
fix py2/3 mode=r and/rb, and remove native line ending translation. fixes win32
-rw-r--r--QMTest/TestSCons.py2
-rw-r--r--test/Configure/ConfigureDryRunError.py32
-rw-r--r--test/Configure/config-h.py2
3 files changed, 18 insertions, 18 deletions
diff --git a/QMTest/TestSCons.py b/QMTest/TestSCons.py
index a8651d9..d33eae7 100644
--- a/QMTest/TestSCons.py
+++ b/QMTest/TestSCons.py
@@ -1028,7 +1028,7 @@ SConscript( sconscript )
nols = nols + "|"
nols = nols + ")"
lastEnd = 0
- logfile = self.read(self.workpath(logfile),mode='r')
+ logfile = self.read(self.workpath(logfile))
# Some debug code to keep around..
# sys.stderr.write("LOGFILE[%s]:%s"%(type(logfile),logfile))
diff --git a/test/Configure/ConfigureDryRunError.py b/test/Configure/ConfigureDryRunError.py
index fa85042..b87162c 100644
--- a/test/Configure/ConfigureDryRunError.py
+++ b/test/Configure/ConfigureDryRunError.py
@@ -78,25 +78,25 @@ scons: *** Cannot update configure test "%(conftest_0_c)s" within a dry-run.
test.run(arguments='-n', status=2, stderr=expect)
test.run()
-test.checkLogAndStdout( ["Checking for C library %s... " % lib,
- "Checking for C library hopefullynolib... "],
- ["yes", "no"],
- [[((".c", NCR), (_obj, NCR))],
- [((".c", NCR), (_obj, NCF))]],
- "config.log", ".sconf_temp", "SConstruct")
+test.checkLogAndStdout(["Checking for C library %s... " % lib,
+ "Checking for C library hopefullynolib... "],
+ ["yes", "no"],
+ [[((".c", NCR), (_obj, NCR))],
+ [((".c", NCR), (_obj, NCF))]],
+ "config.log", ".sconf_temp", "SConstruct")
-oldLog = test.read(test.workpath('config.log'))
+oldLog = test.read(test.workpath('config.log'), mode='r')
test.run(arguments='-n')
-test.checkLogAndStdout( ["Checking for C library %s... " % lib,
- "Checking for C library hopefullynolib... "],
- ["yes", "no"],
- [[((".c", CR), (_obj, CR))],
- [((".c", CR), (_obj, CF))]],
- "config.log", ".sconf_temp", "SConstruct",
- doCheckLog=0)
-
-newLog = test.read(test.workpath('config.log'))
+test.checkLogAndStdout(["Checking for C library %s... " % lib,
+ "Checking for C library hopefullynolib... "],
+ ["yes", "no"],
+ [[((".c", CR), (_obj, CR))],
+ [((".c", CR), (_obj, CF))]],
+ "config.log", ".sconf_temp", "SConstruct",
+ doCheckLog=0)
+
+newLog = test.read(test.workpath('config.log'), mode='r')
if newLog != oldLog:
print("Unexpected update of log file within a dry run")
test.fail_test()
diff --git a/test/Configure/config-h.py b/test/Configure/config-h.py
index ff5e5b2..a5c1998 100644
--- a/test/Configure/config-h.py
+++ b/test/Configure/config-h.py
@@ -130,7 +130,7 @@ expected_config_h = ("""\
/* #undef HAVE_LIBHOPEFULLYNOLIB2 */
#endif /* CONFIG_H_SEEN */
-""" % locals()).replace("\n", os.linesep)
+""" % locals())
test.run(stdout=expected_stdout)