diff options
author | Adam Gross <grossag@vmware.com> | 2019-11-25 15:48:44 (GMT) |
---|---|---|
committer | Adam Gross <grossag@vmware.com> | 2019-11-25 15:48:44 (GMT) |
commit | 49b5f9ec268d6f913088cae0b2942f5c7a139693 (patch) | |
tree | cb0144e67716f50b0a5ddcc2e3c72e2ccd82500c | |
parent | 49403a2d8484f9d464ac194a625a5feae3e9430b (diff) | |
parent | ca1f22964769ded3cd5e4b685c5d6ec9f9413707 (diff) | |
download | SCons-49b5f9ec268d6f913088cae0b2942f5c7a139693.zip SCons-49b5f9ec268d6f913088cae0b2942f5c7a139693.tar.gz SCons-49b5f9ec268d6f913088cae0b2942f5c7a139693.tar.bz2 |
Merge remote-tracking branch 'upstream/master'
26 files changed, 129 insertions, 81 deletions
diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..089d31b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +doc/* linguist-documentation +src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1 linguist-vendored +*.xml linguist-documentation +*.xsl linguist-documentation +*.gen linguist-documentation + diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..9daae32 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,5 @@ +# These are supported funding model platforms + +github: bdbaddog +patreon: bdbaddog + diff --git a/bin/scons_dev_master.py b/bin/scons_dev_master.py index 4b1160f..cdbd68e 100644..100755 --- a/bin/scons_dev_master.py +++ b/bin/scons_dev_master.py @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/python # # A script for turning a generic Ubuntu system into a master for diff --git a/doc/generated/functions.gen b/doc/generated/functions.gen index e55799c..f3f2a0c 100644 --- a/doc/generated/functions.gen +++ b/doc/generated/functions.gen @@ -2505,16 +2505,16 @@ This specifies help text to be printed if the <option>-h</option> argument is given to <filename xmlns="http://www.scons.org/dbxsd/v1.0">scons</filename>. -If +If <function xmlns="http://www.scons.org/dbxsd/v1.0">Help</function> -is called multiple times, the text is appended together in the order that +is called multiple times, the text is appended together in the order that <function xmlns="http://www.scons.org/dbxsd/v1.0">Help</function> -is called. With append set to False, any +is called. With append set to False, any <function xmlns="http://www.scons.org/dbxsd/v1.0">Help</function> -text generated with +text generated with <function xmlns="http://www.scons.org/dbxsd/v1.0">AddOption</function> is clobbered. If append is True, the AddOption help is prepended to the help -string, thus preserving the +string, thus preserving the <option>-h</option> message. </para> @@ -2955,6 +2955,7 @@ and added to the following construction variables: -fmerge-all-constants CCFLAGS, LINKFLAGS -fopenmp CCFLAGS, LINKFLAGS -include CCFLAGS +-imacros CCFLAGS -isysroot CCFLAGS, LINKFLAGS -isystem CCFLAGS -iquote CCFLAGS diff --git a/doc/man/scons.xml b/doc/man/scons.xml index a9e0dd7..ae54e2e 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -4960,7 +4960,8 @@ the same target file(s). The default is 0, which means the builder can not be called multiple times for the same target file(s). Calling a builder multiple times for the same target simply adds additional source files to the target; it is not allowed to change the environment associated -with the target, specify addition environment overrides, or associate a different +with the target, specify additional environment overrides, +or associate a different builder with the target.</para> </listitem> diff --git a/src/CHANGES.txt b/src/CHANGES.txt index af448d5..db0a5f2 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -6,6 +6,11 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER + From Philipp Maierhöfer: + - Avoid crash with UnicodeDecodeError on Python 3 when a Latex log file in + non-UTF-8 encoding (e.g. containing umlauts in Latin-1 encoding when + the fontenc package is included with \usepackage[T1]{fontenc}) is read. + From Mathew Robinson: - Improved threading performance by ensuring NodeInfo is shared @@ -25,6 +30,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER On vs2019 saves 5+ seconds per SCons invocation, which really helps test suite runs. - Remove deprecated SourceSignatures, TargetSignatures + - Remove deprecated Builder keywords: overrides and scanner From Jacek Kuczera: - Fix CheckFunc detection code for Visual 2019. Some functions @@ -32,10 +38,16 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER From Jakub Kulik - Fix subprocess result bytes not being decoded in SunOS/Solaris related tools. - + From Edoardo Bezzeccheri - Added debug option "action_timestamps" which outputs to stdout the absolute start and end time for each target. + From Ivan Kravets + - Added support for "-imacros" to ParseFlags + + From Tim Gates + - Resolved a typo in engine.SCons.Tool + RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 From William Deegan: diff --git a/src/engine/SCons/Builder.py b/src/engine/SCons/Builder.py index 4352d7a..e3fb396 100644 --- a/src/engine/SCons/Builder.py +++ b/src/engine/SCons/Builder.py @@ -396,16 +396,13 @@ class BuilderBase(object): self.env = env self.single_source = single_source if 'overrides' in overrides: - SCons.Warnings.warn(SCons.Warnings.DeprecatedBuilderKeywordsWarning, - "The \"overrides\" keyword to Builder() creation has been deprecated;\n" +\ - "\tspecify the items as keyword arguments to the Builder() call instead.") - overrides.update(overrides['overrides']) - del overrides['overrides'] + msg = "The \"overrides\" keyword to Builder() creation has been removed;\n" +\ + "\tspecify the items as keyword arguments to the Builder() call instead." + raise TypeError(msg) if 'scanner' in overrides: - SCons.Warnings.warn(SCons.Warnings.DeprecatedBuilderKeywordsWarning, - "The \"scanner\" keyword to Builder() creation has been deprecated;\n" - "\tuse: source_scanner or target_scanner as appropriate.") - del overrides['scanner'] + msg = "The \"scanner\" keyword to Builder() creation has been removed;\n" +\ + "\tuse: source_scanner or target_scanner as appropriate." + raise TypeError(msg) self.overrides = overrides self.set_suffix(suffix) diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 0e1102e..1296f54 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -702,31 +702,34 @@ class SubstitutionEnvironment(object): append_next_arg_to = None # for multi-word args for arg in params: if append_next_arg_to: - if append_next_arg_to == 'CPPDEFINES': - append_define(arg) - elif append_next_arg_to == '-include': - t = ('-include', self.fs.File(arg)) - dict['CCFLAGS'].append(t) - elif append_next_arg_to == '-isysroot': - t = ('-isysroot', arg) - dict['CCFLAGS'].append(t) - dict['LINKFLAGS'].append(t) - elif append_next_arg_to == '-isystem': - t = ('-isystem', arg) - dict['CCFLAGS'].append(t) - elif append_next_arg_to == '-iquote': - t = ('-iquote', arg) - dict['CCFLAGS'].append(t) - elif append_next_arg_to == '-idirafter': - t = ('-idirafter', arg) - dict['CCFLAGS'].append(t) - elif append_next_arg_to == '-arch': - t = ('-arch', arg) - dict['CCFLAGS'].append(t) - dict['LINKFLAGS'].append(t) - else: - dict[append_next_arg_to].append(arg) - append_next_arg_to = None + if append_next_arg_to == 'CPPDEFINES': + append_define(arg) + elif append_next_arg_to == '-include': + t = ('-include', self.fs.File(arg)) + dict['CCFLAGS'].append(t) + elif append_next_arg_to == '-imacros': + t = ('-imacros', self.fs.File(arg)) + dict['CCFLAGS'].append(t) + elif append_next_arg_to == '-isysroot': + t = ('-isysroot', arg) + dict['CCFLAGS'].append(t) + dict['LINKFLAGS'].append(t) + elif append_next_arg_to == '-isystem': + t = ('-isystem', arg) + dict['CCFLAGS'].append(t) + elif append_next_arg_to == '-iquote': + t = ('-iquote', arg) + dict['CCFLAGS'].append(t) + elif append_next_arg_to == '-idirafter': + t = ('-idirafter', arg) + dict['CCFLAGS'].append(t) + elif append_next_arg_to == '-arch': + t = ('-arch', arg) + dict['CCFLAGS'].append(t) + dict['LINKFLAGS'].append(t) + else: + dict[append_next_arg_to].append(arg) + append_next_arg_to = None elif not arg[0] in ['-', '+']: dict['LIBS'].append(self.fs.File(arg)) elif arg == '-dylib_file': @@ -793,7 +796,7 @@ class SubstitutionEnvironment(object): elif arg[0] == '+': dict['CCFLAGS'].append(arg) dict['LINKFLAGS'].append(arg) - elif arg in ['-include', '-isysroot', '-isystem', '-iquote', '-idirafter', '-arch']: + elif arg in ['-include', '-imacros', '-isysroot', '-isystem', '-iquote', '-idirafter', '-arch']: append_next_arg_to = arg else: dict['CCFLAGS'].append(arg) diff --git a/src/engine/SCons/Environment.xml b/src/engine/SCons/Environment.xml index 829bf12..516505c 100644 --- a/src/engine/SCons/Environment.xml +++ b/src/engine/SCons/Environment.xml @@ -2324,6 +2324,7 @@ and added to the following construction variables: -fmerge-all-constants CCFLAGS, LINKFLAGS -fopenmp CCFLAGS, LINKFLAGS -include CCFLAGS +-imacros CCFLAGS -isysroot CCFLAGS, LINKFLAGS -isystem CCFLAGS -iquote CCFLAGS diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index f016f22..0957361 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -804,6 +804,7 @@ sys.exit(0) "-iquote /usr/include/foo1 " + \ "-isystem /usr/include/foo2 " + \ "-idirafter /usr/include/foo3 " + \ + "-imacros /usr/include/foo4 " + \ "+DD64 " + \ "-DFOO -DBAR=value -D BAZ " @@ -818,6 +819,7 @@ sys.exit(0) ('-iquote', '/usr/include/foo1'), ('-isystem', '/usr/include/foo2'), ('-idirafter', '/usr/include/foo3'), + ('-imacros', env.fs.File('/usr/include/foo4')), '+DD64'], repr(d['CCFLAGS']) assert d['CXXFLAGS'] == ['-std=c++0x'], repr(d['CXXFLAGS']) assert d['CPPDEFINES'] == ['FOO', ['BAR', 'value'], 'BAZ'], d['CPPDEFINES'] diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py index c8fb389..f255b21 100644 --- a/src/engine/SCons/Tool/__init__.py +++ b/src/engine/SCons/Tool/__init__.py @@ -99,7 +99,7 @@ for suffix in LaTeXSuffixes: SourceFileScanner.add_scanner(suffix, LaTeXScanner) SourceFileScanner.add_scanner(suffix, PDFLaTeXScanner) -# Tool aliases are needed for those tools whos module names also +# Tool aliases are needed for those tools whose module names also # occur in the python standard library. This causes module shadowing and # can break using python library functions under python3 TOOL_ALIASES = { diff --git a/src/engine/SCons/Tool/tex.py b/src/engine/SCons/Tool/tex.py index 64b9d3b..5cf7bca 100644 --- a/src/engine/SCons/Tool/tex.py +++ b/src/engine/SCons/Tool/tex.py @@ -297,8 +297,8 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None logfilename = targetbase + '.log' logContent = '' if os.path.isfile(logfilename): - with open(logfilename, "r") as f: - logContent = f.read() + with open(logfilename, "rb") as f: + logContent = f.read().decode(errors='replace') # Read the fls file to find all .aux files diff --git a/test/GetBuildFailures/option-k.py b/test/GetBuildFailures/option-k.py index 92a9db8..039ad50 100644 --- a/test/GetBuildFailures/option-k.py +++ b/test/GetBuildFailures/option-k.py @@ -45,11 +45,11 @@ test = TestSCons.TestSCons() contents = r"""\ import sys -if sys.argv[0] == 'mypass.py': +if 'mypass.py' in sys.argv[0]: with open(sys.argv[3], 'wb') as ofp, open(sys.argv[4], 'rb') as ifp: ofp.write(ifp.read()) exit_value = 0 -elif sys.argv[0] == 'myfail.py': +elif 'myfail.py' in sys.argv[0]: exit_value = 1 sys.exit(exit_value) """ diff --git a/test/GetBuildFailures/parallel.py b/test/GetBuildFailures/parallel.py index 5387e4a..63125ad 100644 --- a/test/GetBuildFailures/parallel.py +++ b/test/GetBuildFailures/parallel.py @@ -59,11 +59,11 @@ write_marker = sys.argv[2] + '.marker' if wait_marker != '-.marker': while not os.path.exists(wait_marker): time.sleep(1) -if sys.argv[0] == 'mypass.py': +if 'mypass.py' in sys.argv[0]: with open(sys.argv[3], 'wb') as ofp, open(sys.argv[4], 'rb') as ifp: ofp.write(ifp.read()) exit_value = 0 -elif sys.argv[0] == 'myfail.py': +elif 'myfail.py' in sys.argv[0]: exit_value = 1 if write_marker != '-.marker': os.mkdir(write_marker) diff --git a/test/GetBuildFailures/serial.py b/test/GetBuildFailures/serial.py index 7557dd5..4aecc12 100644 --- a/test/GetBuildFailures/serial.py +++ b/test/GetBuildFailures/serial.py @@ -48,11 +48,11 @@ test = TestSCons.TestSCons() contents = r"""\ import sys -if sys.argv[0] == 'mypass.py': +if 'mypass.py' in sys.argv[0]: with open(sys.argv[3], 'wb') as ofp, open(sys.argv[4], 'rb') as ifp: ofp.write(ifp.read()) exit_value = 0 -elif sys.argv[0] == 'myfail.py': +elif 'myfail.py' in sys.argv[0]: exit_value = 1 sys.exit(exit_value) """ diff --git a/test/Rpcgen/RPCGEN.py b/test/Rpcgen/RPCGEN.py index eaa4e16..86cdd71 100644 --- a/test/Rpcgen/RPCGEN.py +++ b/test/Rpcgen/RPCGEN.py @@ -69,10 +69,10 @@ expect_h = output % ('-h', test.workpath('rpcif.h')) expect_svc = output % ('-m', test.workpath('rpcif_svc.c')) expect_xdr = output % ('-c', test.workpath('rpcif_xdr.c')) -test.must_match('rpcif_clnt.c', expect_clnt, mode='r') -test.must_match('rpcif.h', expect_h, mode='r') -test.must_match('rpcif_svc.c', expect_svc, mode='r') -test.must_match('rpcif_xdr.c', expect_xdr, mode='r') +test.must_contain('rpcif_clnt.c', expect_clnt, mode='r') +test.must_contain('rpcif.h', expect_h, mode='r') +test.must_contain('rpcif_svc.c', expect_svc, mode='r') +test.must_contain('rpcif_xdr.c', expect_xdr, mode='r') diff --git a/test/Rpcgen/RPCGENCLIENTFLAGS.py b/test/Rpcgen/RPCGENCLIENTFLAGS.py index a298ebd..1143227 100644 --- a/test/Rpcgen/RPCGENCLIENTFLAGS.py +++ b/test/Rpcgen/RPCGENCLIENTFLAGS.py @@ -72,10 +72,10 @@ expect_h = output % ('-h', test.workpath('rpcif.h')) expect_svc = output % ('-m', test.workpath('rpcif_svc.c')) expect_xdr = output % ('-c', test.workpath('rpcif_xdr.c')) -test.must_match('rpcif_clnt.c', expect_clnt, mode='r') -test.must_match('rpcif.h', expect_h, mode='r') -test.must_match('rpcif_svc.c', expect_svc, mode='r') -test.must_match('rpcif_xdr.c', expect_xdr, mode='r') +test.must_contain('rpcif_clnt.c', expect_clnt, mode='r') +test.must_contain('rpcif.h', expect_h, mode='r') +test.must_contain('rpcif_svc.c', expect_svc, mode='r') +test.must_contain('rpcif_xdr.c', expect_xdr, mode='r') diff --git a/test/Rpcgen/RPCGENFLAGS.py b/test/Rpcgen/RPCGENFLAGS.py index c254ed0..3673a23 100644 --- a/test/Rpcgen/RPCGENFLAGS.py +++ b/test/Rpcgen/RPCGENFLAGS.py @@ -71,10 +71,10 @@ expect_h = output % ('-h', test.workpath('rpcif.h')) expect_svc = output % ('-m', test.workpath('rpcif_svc.c')) expect_xdr = output % ('-c', test.workpath('rpcif_xdr.c')) -test.must_match('rpcif_clnt.c', expect_clnt, mode='r') -test.must_match('rpcif.h', expect_h, mode='r') -test.must_match('rpcif_svc.c', expect_svc, mode='r') -test.must_match('rpcif_xdr.c', expect_xdr, mode='r') +test.must_contain('rpcif_clnt.c', expect_clnt, mode='r') +test.must_contain('rpcif.h', expect_h, mode='r') +test.must_contain('rpcif_svc.c', expect_svc, mode='r') +test.must_contain('rpcif_xdr.c', expect_xdr, mode='r') diff --git a/test/Rpcgen/RPCGENHEADERFLAGS.py b/test/Rpcgen/RPCGENHEADERFLAGS.py index 8e40ad7..6223ba3 100644 --- a/test/Rpcgen/RPCGENHEADERFLAGS.py +++ b/test/Rpcgen/RPCGENHEADERFLAGS.py @@ -72,10 +72,10 @@ expect_h = output_h % ('-h', test.workpath('rpcif.h')) expect_svc = output % ('-m', test.workpath('rpcif_svc.c')) expect_xdr = output % ('-c', test.workpath('rpcif_xdr.c')) -test.must_match('rpcif_clnt.c', expect_clnt, mode='r') -test.must_match('rpcif.h', expect_h, mode='r') -test.must_match('rpcif_svc.c', expect_svc, mode='r') -test.must_match('rpcif_xdr.c', expect_xdr, mode='r') +test.must_contain('rpcif_clnt.c', expect_clnt, mode='r') +test.must_contain('rpcif.h', expect_h, mode='r') +test.must_contain('rpcif_svc.c', expect_svc, mode='r') +test.must_contain('rpcif_xdr.c', expect_xdr, mode='r') diff --git a/test/Rpcgen/RPCGENSERVICEFLAGS.py b/test/Rpcgen/RPCGENSERVICEFLAGS.py index 2edc77c..7cdf430 100644 --- a/test/Rpcgen/RPCGENSERVICEFLAGS.py +++ b/test/Rpcgen/RPCGENSERVICEFLAGS.py @@ -72,10 +72,10 @@ expect_h = output % ('-h', test.workpath('rpcif.h')) expect_svc = output_svc % ('-m', test.workpath('rpcif_svc.c')) expect_xdr = output % ('-c', test.workpath('rpcif_xdr.c')) -test.must_match('rpcif_clnt.c', expect_clnt, mode='r') -test.must_match('rpcif.h', expect_h, mode='r') -test.must_match('rpcif_svc.c', expect_svc, mode='r') -test.must_match('rpcif_xdr.c', expect_xdr, mode='r') +test.must_contain('rpcif_clnt.c', expect_clnt, mode='r') +test.must_contain('rpcif.h', expect_h, mode='r') +test.must_contain('rpcif_svc.c', expect_svc, mode='r') +test.must_contain('rpcif_xdr.c', expect_xdr, mode='r') diff --git a/test/Rpcgen/RPCGENXDRFLAGS.py b/test/Rpcgen/RPCGENXDRFLAGS.py index 2d1ca96..2f6d8d9 100644 --- a/test/Rpcgen/RPCGENXDRFLAGS.py +++ b/test/Rpcgen/RPCGENXDRFLAGS.py @@ -72,10 +72,10 @@ expect_h = output % ('-h', test.workpath('rpcif.h')) expect_svc = output % ('-m', test.workpath('rpcif_svc.c')) expect_xdr = output_xdr % ('-c', test.workpath('rpcif_xdr.c')) -test.must_match('rpcif_clnt.c', expect_clnt, mode='r') -test.must_match('rpcif.h', expect_h, mode='r') -test.must_match('rpcif_svc.c', expect_svc, mode='r') -test.must_match('rpcif_xdr.c', expect_xdr, mode='r') +test.must_contain('rpcif_clnt.c', expect_clnt, mode='r') +test.must_contain('rpcif.h', expect_h, mode='r') +test.must_contain('rpcif_svc.c', expect_svc, mode='r') +test.must_contain('rpcif_xdr.c', expect_xdr, mode='r') diff --git a/test/TEX/LATEX.py b/test/TEX/LATEX.py index 553313e..dabe8b1 100644 --- a/test/TEX/LATEX.py +++ b/test/TEX/LATEX.py @@ -28,6 +28,8 @@ r""" Validate that we can set the LATEX string to our own utility, that the produced .dvi, .aux and .log files get removed by the -c option, and that we can use this to wrap calls to the real latex utility. +Check that a log file with a warning encoded in non-UTF-8 (here: Latin-1) +is read without throwing an error. """ import TestSCons @@ -193,6 +195,24 @@ This is the include file. mod %s test.must_not_exist('latexi.ilg') + test.write('SConstruct', """ +env = Environment() +env.DVI('latin1log.tex') +""") + + # This will trigger an overfull hbox warning in the log file, + # containing the umlaut "o in Latin-1 ("T1 fontenc") encoding. + test.write('latin1log.tex', r""" +\documentclass[12pt,a4paper]{article} +\usepackage[T1]{fontenc} +\begin{document} +\"oxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +\end{document} +""") + + test.run(arguments = 'latin1log.dvi', stderr = None) + test.must_exist('latin1log.dvi') + test.pass_test() # Local Variables: diff --git a/test/YACC/YACCHFILESUFFIX.py b/test/YACC/YACCHFILESUFFIX.py index 6c34db1..da3416c 100644 --- a/test/YACC/YACCHFILESUFFIX.py +++ b/test/YACC/YACCHFILESUFFIX.py @@ -71,9 +71,9 @@ test.write('bbb.yacc', "bbb.yacc\n/*yacc*/\n") test.run(arguments = '.') test.must_match('aaa.c', "aaa.y\n") -test.must_match('aaa.hsuffix', "myyacc.py -d -o aaa.c aaa.y\n") +test.must_contain('aaa.hsuffix', "myyacc.py -d -o aaa.c aaa.y\n") test.must_match('bbb.c', "bbb.yacc\n") -test.must_match('bbb.hsuffix', "myyacc.py -d -o bbb.c bbb.yacc\n") +test.must_contain('bbb.hsuffix', "myyacc.py -d -o bbb.c bbb.yacc\n") test.up_to_date(arguments = '.') diff --git a/test/YACC/YACCHXXFILESUFFIX.py b/test/YACC/YACCHXXFILESUFFIX.py index 63a5358..3ee70ee 100644 --- a/test/YACC/YACCHXXFILESUFFIX.py +++ b/test/YACC/YACCHXXFILESUFFIX.py @@ -69,7 +69,7 @@ test.write('aaa.yy', "aaa.yy\n/*yacc*/\n") test.run(arguments = '.') test.must_match('aaa.cc', "aaa.yy\n") -test.must_match('aaa.hxxsuffix', "myyacc.py -d -o aaa.cc aaa.yy\n") +test.must_contain('aaa.hxxsuffix', "myyacc.py -d -o aaa.cc aaa.yy\n") test.up_to_date(arguments = '.') diff --git a/test/YACC/YACCVCGFILESUFFIX.py b/test/YACC/YACCVCGFILESUFFIX.py index aee3265..32c3440 100644 --- a/test/YACC/YACCVCGFILESUFFIX.py +++ b/test/YACC/YACCVCGFILESUFFIX.py @@ -78,7 +78,7 @@ test.must_not_exist('aaa.vcgsuffix') test.must_match('bbb.cc', "bbb.yy\n") test.must_not_exist('bbb.vcg') -test.must_match('bbb.vcgsuffix', "myyacc.py -g -o bbb.cc bbb.yy\n") +test.must_contain('bbb.vcgsuffix', "myyacc.py -g -o bbb.cc bbb.yy\n") test.up_to_date(arguments = '.') diff --git a/testing/framework/TestCmd.py b/testing/framework/TestCmd.py index 81e03f3..9218f60 100644 --- a/testing/framework/TestCmd.py +++ b/testing/framework/TestCmd.py @@ -1528,7 +1528,7 @@ class TestCmd(object): # TODO: Run full tests on both platforms and see if this fixes failures # It seems that py3.6 still sets text mode if you set encoding. elif sys.version_info[0] == 3: # TODO and sys.version_info[1] < 6: - stream = stream.decode('utf-8') + stream = stream.decode('utf-8', errors='replace') stream = stream.replace('\r\n', '\n') elif sys.version_info[0] == 2: stream = stream.replace('\r\n', '\n') |