| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| | |
Update test framework tutorial
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A few minor edits, then a section added at the end mith more hints
on things that are useful when writing both kinds of tests.
Added an initial .editorconfig - this was useful to keep a formatting
style for the test-framework.rst while tweaking it.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
| |\
| |
| |
| | |
fix_configure_marking_up_to_date
|
| | |\
| | |
| | |
| | | |
add_logging_to_new_parallel_job
|
| | | |
| | |
| | |
| | | |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | | |
| | |
| | |
| | | |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | | |
| | |
| | |
| | | |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | | |\
| | | |
| | | |
| | | | |
testfw/fstringify
|
| | | | |
| | | |
| | | |
| | | | |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | | |/ |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Again thanks to Bill Deegan, the two remaining framework tests
on Linux now work.
Windows still shows a number of fails.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Changed the regex for the explicitly generated exception so it also
works on Python 3.11+ with the new 'helpful errors' which can add an
extra line to the output trying to show the error (thanks to Bill Deegan)
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a mostly tool-based conversion (a couple added by hand),
and other changes were not made, to try to keep the diff manageable.
Adds a GitHub Action to run framework tests if framework changes.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The framework tests have been failing one test in the Common set,
partly due to a missing None in the expected text for the exception
test, and partly due to a change in SCons code that appears in a
traceback that had been captured, but not properly escaped.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | | |
| | |
| | |
| | |
| | |
| | | |
adding DefaultEnvironment calls with no tools
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A rawstring to avoid an invalid escape warning.
A couple of instances where code is comparing type () calls,
advice is to is isinstance() instead.
Missing backslashes on escapes in framewok test (rarely run)
Updating expected traceback msg in framework test after the
code which forces the exception changed in a previous revision.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | | |
| | |
| | |
| | | |
of the file. It's no longer there. Added TestCommon.detailed_diff() function which can be used to diff large text blobs expected vs actual
|
| | |/
| |
| |
| | |
--taskmastertracefor (NewParallel/LegacyParallel Jobs). Now uses golden files to compare expected output and output files
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Recent Pythons raise a ResourceWarning if they collect resources
that had not been closed. The TestCmdTest tests have a testcase for
the "start" method that because of the way it was written, does
not close subprocess.Popen files before starting a new instance,
which leads to the collection/warnig. Add a _cleanup method in that
test class for closing.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since Python 3.3, the subprocess module has its own timeout
implementation, so remove the test framework's custom one.
Required a little rejigger since the subprocess timeout is done
on the communicate() call, not set up before the test is started.
Noted that the framework intends to support two levels:
one for the testing class instance, and one for an individual
start call, which should override the one in the instance.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | |
| |
| |
| |
| |
| |
| | |
Instead of skipping the whole kill/check loop if psutil module is not found,
instead just skip the check part - should be okay to issue the kill.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some odd environments - the one I'm running into it is inside an
msys2 POSIX shell on Windows, using msys Python - don't have a psutil
module to install. Let the test framework continue to work even
if this is the case.
fixes #4199
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Replaces one custom function with one from Python stdlib (textwrap.dedent)
Fixes one test case that did not check for None
Changes "fill line with a character" implementations to use Python
string formatting, which has this capability.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | | |
|
| | |\
| | |
| | | |
Improvements to lex and yacc tools
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The mocked tools mylex.py and myyacc.py now understand the file-generation
options, and generate a dummy file with predictable contents, for
checking. This allows more testing of the path through the SCons support
for these two without needing live commands.
New tests added which invoke the file-generation options, and make
sure the extra files are created, and that SCons detects and tracks
the added targets. Work is done in a subdirectory, which exposes some
existing known inconsistent behavior (the regular generated file goes
in the subdir per the LEXCOM and YACCOM generated line, while the ones
generated from commandline options go in the topdir) - but we're going
to allow that behavior to continue for backwards compat.
Same fix applied to yacc tool that PR #4168 did for lex - do subst_list()
instead of subst() to preserve spaces in paths. That fix left the lex
tool unable to pass the new test, as it could not see the individual
arguments in the FLAGS variable, which was solved by indexing into the
subst'd list so we can iterate over the args again.
Test and tool cleanup; add DefaultEnvironment calls, etc.
Note this mentions, but does not address the problem described in issue 4154.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| | |
Minor maintenance to drop a regex group in a few tests (including in
a test framework test) which allowed for two different exception
messages: one belongs to very old Pythons which are no longer
supported by SCons.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | |\
| | |
| | | |
[NINJA] Added new alias 'shutdown-ninja-scons-daemon' to allow ninja to shutdown the daemon
|
| | | | |
|
| | | |
| | |
| | |
| | | |
Added note to CHANGES.txt/RELEASE.txt that psutil is required for the new test for this function
|
| | | |\ |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
daemon
|
| | | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | | |
Where string pasting is done using test or interpreter paths, make sure
they're pasted as raw strings to avoid problems on the Windows platform,
where the likely presence of '\Users` is likely to cause a unicode error.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | | | |
|
| | |/
| |
| |
| | |
KEY=VAL for each item in that dict. Also changed to unittest.main() form TestSuite()
|
| | |
| |
| |
| | |
to stdout after the original message
|
| | |\ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A couple of unittest methods that a few SCons tests use have
been marked deprecated in Python 3.11, with replacements provided.
Partial fix for #4162, do not close just off this PR.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | |/
|/|
| |
| | |
info cleared after check.
|
| |/
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|
|
|
|
|
|
|
| |
If the framework wait_for() method actually times out, it tries to return
stdout and stderr by calling the framework methods of those names.
The stdout() method was protected against the message not having been
captured (as is the case on timeout). Updated the stderr() method to
use the same technique.
Signed-off-by: Mats Wichmann <mats@linux.com>
|