| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
On a linux host (missing some things that may be on the Travis CI
setup), Py3.8a3 now shows 19 fails, 1048 pass, with 84 Warning: messages.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|\ |
|
| |
| |
| |
| | |
overriding python's native EnvironmentError
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The java tool common routine finds a jdk by doing a filesystem glob.
This had a problem on windows in the case a specific version is requested,
because the format of name of the jdk directory has changed with JDK 9 -
there is a dash between jdk and the version string. The glob which does
not attempt to match a version was general enough not to trip on this,
but with a version to match it would never match jdk-9 or higher.
The test harness then asks the found javac what version it is, and the
parsing of that did not work as expected once version numbers became
double-digit, as the regex was for a single digit followed by a dot.
The outcome is for 11.0.2 we get back '11' instead of '11.0'. Change the
regex to match any number of digits followed by dot.
The Repository/RMIC.py change is to align with an earlier change to
Java/RMIC.py, but the may not be needed after the change to regex
just described.
Clean up some of the Java tool routines for consistency (there was
no functional change outside of JavaCommon.py)
Docstrings added or updated in several places.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
| |
One was "real": had failed to indent a with: block
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several locations with simple usage of deprecated "imp" module
changed to use "importlib". These match with work in #3159,
but this is not a complete implementation of #3159.
More regex patterns are changed to be raw strings.
Some strings which did not seem appropriate to change to raw
strings (e.g. contain embedded tabs, which Python should honor)
had backslashes escaped to avoid accidental Python interpretation.
Example:
'\t<Import Project="$(VCTargetsPath)\\Microsoft.Cpp.targets" />\n'
Python 3.8 was Warning \M was an unknown escape.
More open().write(), open().read() style usage changed to use
context managers so the file is closed.
WIP part: even with Python 3.7, the tests which call sconsign.py
fail; oddly they do not fail without the patch to compat.py.
sconsign.py does an import using imp module (which is what
generates the errors) so needs to be updated anyway. It does not
quite fit the "simple usage" pattern - can't do a simple relative
import since sconsign is normally located elsewhere in the tree than
the main scons code body.
With this version of the patch, 700 tests now pass with 3.8, and
Warning messages reduced to 2800 (current master has 200 pass,
9000 warns)
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With runtest now honoring the -j 2 option given to it in
CI setup on Windows, there were some problems where scons-time
tests could try to remove a test directory while some files
in it were still open (these locations were complained about
by Python 3.8 also).
Switch test framework to using mkdtemp also, and to not use
tempfile.template (usage of that and mktemp are long
deprecated)
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| | |
were breaking Windows tests.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To fix some test problems for pypy, which seem more prone to
problems of lost data if files are written and not explicitly
closed, add context managers on file opens in scons-time.
Also quiets warnings which are emitted by the much noisier
Python 3.8. Changes are to the scons-time script and to
the framework.
After visual inspection of outputs while debugging, switched
the framework's created tools in the scons-time area to use
os.linesep instead of explicit '\\n' strings, tools should
operate in a native way.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
| |
As noted in issue #3304, the Python flag to error on inconsistent
tabs/spaces has been dropped for Python 3 interpreters; while
CPython still accepts it, silently ignoring it, PyPy3 errors out.
This change adds the flag throughout the testsuite run only if
using a Python2 interpreter.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
| |
Plenty of complaints coming from Python 3.8alpha on unclosed files.
Targeted those areas which intersect with PyPy failures - this changeset
reduces the PyPy fails by 17 on the local test environment.
So this affects both Issue #3299 and the PyPy support project.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
| |
In a few places, "is" and "is not" are used to compare with
a string or integer literal. Python 3.8 flags these with
a SyntaxWarning. Changed to == and !=
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
| |
|
|
|
|
| |
fixed some other tests
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
attempt fixing TestSCons.where_is() for win32
|
| | |
|
| |
| |
| |
| | |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|/
|
|
|
|
|
|
| |
A few tests blew up with exceptions (AttributeError, IndexError) if no
compiler is installed on Windows - from where they are it could possibly
happen on other platforms as well.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Two tests were missing the raw-string marker when defining
the Python include path.
TestSCons:get_platform_python_info needed some rework for Windows,
it was failing to find the python library if running in a virtual
environment. Also removed a try-block; sys.version_info is standard
since Python 2.0 and so does not need wrapping.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|\
| |
| |
| | |
fix_java_tests_path_with_spaces
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
| |
TestCommon's options_arguments to keep passed lists and not join them into a string.
|
|
|
|
|
|
|
|
| |
A little formatting cleanup and some wording changes.
Debugging end to end tests got its own section, could
use more content probably.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
| |
A previous change added a check for Python.h in one SWIG test which did
not have it which turns that test into a skip instead of a fail if the
header is not installed. It was pointed out that having 12 tests check
for the same thing might be optimised by putting the check in the routine
which returns info about the python development environment, so this
change makes that modification.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
| |
Instead of custom conversion as in the previous iteration,
use the to_bytes function.
The two known tests which incorrectly let the text-mode xml file
be opened in binary mode are adjusted to supply mode='r'
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TestCommon defines a method must_contain which checks for a file including
a given string. With Python 3, the test runs into some typing problems.
This could be fixed either by changing all the tests which call the
routine either omitting the mode argument (which then defaults to 'rb'),
or specifying a mode which includes 'b'; or by modifying must_contain to
align the types of the file data and the data to check for. This patch
uses the latter approach.
This is a test-only change, no run-time scons code is modified.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
| |
class TestCmd method read() uses a shortcut to return data from
a file, "return open(...).read()". Python 3 warns this is a
resource leak because the file has no chance to be closed with
the open being in the return statement. Split into two lines
and use a context manager (with statement).
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
| |
needed imports
|
| |
|
|
|
|
| |
paths,and library names. Use sysconfig.get_config_var() calls instead
|
|
|
|
| |
runtest.py was run with instead of blindly searching for python vis test.where_is(). This fixes an issue where the swig tests work fine with py3.6 but not with py2.7 on a win64 box with both installed, runtest launched via py -2 runtest.py ...
|
| |
|
| |
|
| |
|