| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
during repro directory refactor.
|
|
|
|
| |
with current python packaging practices
|
| |
|
|
|
|
| |
for scons-time tests
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Clean up some things suggested by checkers.
- Add a few docsstrings.
- Make RuntestBase an abstract class
- Eliminate Py2 remnants.
- Use subprocess.run for a slightly cleaner interface - don't
have to separately do wait or communicate, don't need to
set up context manager, and everything returns cleanly in a
subprocess.CompletedProcess.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Failure to default some values in class initializer caused a
downstream problem if running no-exec mode, as one field was
added only if running in execute mode.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
| |
| |
| | |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|/
|
|
|
|
|
| |
Python Development Mode imposes more checks (since Python 3.7).
Allow it to optionally be enabled while doing a test run.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A couple of minor reformats along the way, most prominently, in tests,
if being edited anyway, make sure the docstring most tests have is
actually the docstring (sometimes the __revision__ line came before,
which makes the string not be the docstring).
Snuck in some minor framework changes that were orphaned when another
draft PR was not needed: this almost all docstring changes, the
functional part is using casefold instead of lower in a match func -
a slightly better approach which is now possible that Py2 compatibility
is not needed.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
| |
src (unittests)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Except for Platform/win32.py, the engine code no longer
called insecure/deprecated tempfile.mktemp. That location
is now also changed to use better methods. A couple of
vestiges of old ways (like in comments) cleaned out.
A couple of unit tests also converted - these don't have
any impact on the scons engine, of course.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
| |
This is a minor change to runtest, some slight rearrangements,
adding a docstring, clarifying a few comments. The subclass
of Thread is now more precise in following the Thread constructor.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
| |
The various instances of subprocess.Popen call with
shell=True, but this is not necessary, the test command lines
don't depend on any shell processing and are complete as constructed.
With shell=False, send a list of command words instead of a
single string.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Main fix: if duing a multi-job run (-j flag is present), collect the
test output in runtest and keep the test heading together with the test
output, so the information about a given test will not separated in
the output. The test number is recorded in the test instance instead
of kept as a global. Tests may appear out of order now, but since they
may be run "out of order" depending on how fast the various threads
complete the jobs they pull off the queue, that just reflects reality.
The help message is now the script's docstring, and help prints the
docstring along with some other info. This avoids having the options
described twice (and going out of sync) - once in the inital comment,
once in the help message. A mention of the -j multi-job option is
added, was previously missing.
Also: one less worker than requested was created due to use of
range(1, n) (may have been intentional?). changed to number requested.
Also: the lock is taken from the RunTest instance, not from the global
lock variable. This must have been intended as the lock is stored in
the instance on initialization. The lock was not really declared as
a global, it was just assigned in global scope.
Also: the test result reporting is now split off into its own function,
makes a bit cleaner separation (and facilitates possible changes to
the multi-job model in future).
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most recent Python (3.8 alpha) spews warnings aplenty about two
subjects: unclosed files and strings which look like they have embedded
escapes that Python does not recognize. The latter are usually
regexes, and it provides a reminder that regular expressions should
normally be specified as raw strings, so Python does not attempt to
interpret them. Irritating is that even docstrings are flagged, it's
not obvious what the right answer is for a docstring which contains,
say, a Windows-style path with backslashes.
This converts a bunch of opens that are not closed into context
manager usage and regex patterns into raw strings.
This eliminate about 4000 warnings spewed by Py3.8 (9200 remain).
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>
|
|
|
|
|
|
|
|
|
|
| |
Test runs launch Python with the -tt flag to error on
inconsistent tab usage. That flag is no longer part of
Python 3, though it is silently accepted and ignored
in cpython. In PyPy3, it errors. We have other ways
to detect such things now anyway, so just drop.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|
|
|
|
| |
somehow the change from if test to try block got
partly lost during commit. changing else->except
|
|
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
time.clock is deprecated since Python 3.3 and will be removed in
Python 3.8. 3.7 started issuing DeprecationWarning, which
fails about 16 tests in AppVeyor CI (and running manually),
since the warning appears in stderr stream and so real vs expected
does not match any longer. Arguably the tests could be fixed to
do a different check (contains rather than exactly-equal), but
a change needs to be made anyway.
use time.perf_counter as the time function for Python 3. This
works for Windows and non-Windows; however since this function
did not exist in 2.7 (added for 3.3), the Py2 case is left, which
selects between time.clock and time.time depending on OS.
Note this addresses runtest.py, but not code in bench/, which
need attention also. Suggest that be a separate change since
it's not failing tests.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
| |
I don't think the async arg is used anywhere, but I kept it and just
changed the name so the tests run.
|
|
|
|
| |
quite some time
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases it's possible to get a case where the target
path already does exist, but the dir node for it hasn't been
updated yet. This fix prevents MkdirFunc from trying to create
it when it already exists. Added a testcase which failed before
the fix and works after it.
Also fixes a problem running tests on Windows, using standard
python 3 which is installed in "C:/Program Files/Python36".
The python path name has to be escaped in that case. See runtest.py.
|
|\ |
|
| |
| |
| |
| | |
without it.
|
|/
|
|
| |
runtest.py with the exclude option from Github PR 27.
|
| |
|
| |
|
|
|
|
| |
python shell
|
|
|
|
| |
to match test or src will work properly. This is mainly just useful on windows when autocompleting paths
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| | |
python runtest.py test/CC
|
| | |
|
| |
| |
| |
| |
| |
| | |
output according to TAP protocol http://testanything.org/
runtest.py --runner TestUnit.TAPTestRunner src\engine\SCons\ActionTests.py
|
| | |
|
| | |
|