summaryrefslogtreecommitdiffstats
path: root/testing/framework
Commit message (Collapse)AuthorAgeFilesLines
* Elminate http: referencesMats Wichmann2023-10-172-2/+2
| | | | | | | | | | Most remaining http: references are either changed to https: or removed or changed in case they were also stale links, and a replacement was findable. Does not affect schema and stylesheet references, which can remain http: Signed-off-by: Mats Wichmann <mats@linux.com>
* Fixup one test framework test [skip appveyor]Mats Wichmann2023-10-061-7/+6
| | | | | | Looking at wrong exceptions for possible rmdir failures Signed-off-by: Mats Wichmann <mats@linux.com>
* More conversions: {repr(var)} -> {var!r}Mats Wichmann2023-08-042-10/+10
| | | | | | | Some of these got done in the tool conversion, some not, so picked up the rest manually. Signed-off-by: Mats Wichmann <mats@linux.com>
* "Modernize" to Python 3.6 via toolMats Wichmann2023-08-043-5/+4
| | | | | | | | | | | | | | | | | | | | | $ pyupgrade --py36-plus $(<filelist) Here's mostly what it's done: - No more 'stringliteral'.encode('utf-8'): now b'stringliteral' - No more unicode literals - the default open mode is 'r', leaves out if default - some f-string conversions (if shorter) - catch OSError instead of subclasses - no more mention of "object" - generator expression instead of list comp. when safe - a few tests had a shebang but actually began with blank line - remove coding: utf-8 comment, per pep 3120 this is the default now Manually - if a file in test/ was modified, then did the copyright header conversion. Signed-off-by: Mats Wichmann <mats@linux.com>
* test framework doc: fix review comments [ci skip]Mats Wichmann2023-07-211-9/+3
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* Address test-framework.rst review comment [skip appveyor]Mats Wichmann2023-07-211-7/+10
| | | | | | No longer suggest tests should move from unittests to e2e. Signed-off-by: Mats Wichmann <mats@linux.com>
* Update test framework docs [ci skip]Mats Wichmann2023-07-181-75/+131
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* Merge branch 'master' into jbrill-gh4312-fixplusJoseph Brill2023-05-0411-355/+355
|\ | | | | | | | | Manually resolve conflicts: * SCons/Tool/MSCommon/common.py
| * Add some cheap return and parameter annotationsMats Wichmann2023-05-0111-355/+355
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use: https://github.com/JelleZijlstra/autotyping to add "safe" return annotations. Where a parameter has a default value that is an obvious scalar type (bool, int, str, etc.) add those annotations as well. Also fixed two small bugs that popped up when sanity-checking with mypy. One in FortranCommon, where a return had been previously annotated to be a tuple of Action, which should be ActionBase - Action is the factory function, not the base class. The other was a typo in the error raised in _add_cppdefines - the message was formatted with the value of "define" which should have been "defines". Signed-off-by: Mats Wichmann <mats@linux.com>
* | Update the host architecture query function in the MSVS test framework.Joseph Brill2023-03-241-11/+34
|/ | | | | | First query the windows registry for the processor architecture and then fallback to the platform machine architecture. The platform.machine() architecture return value for an amd64 build of python (3.6.8) on arm64 is amd64. Update the _ARCH_TO_CANONICAL dictionary from Tool\MSCommon\vc.py.
* Updates post 4.5.2 releaseWilliam Deegan2023-03-211-1/+1
|
* Merge pull request #4308 from mwichmann/doc/testfw-updateWilliam Deegan2023-03-191-39/+114
|\ | | | | Update test framework tutorial
| * Update test framework tutorial [skip appveyor]Mats Wichmann2023-02-261-39/+114
| | | | | | | | | | | | | | | | | | | | 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>
* | Post release changesWilliam Deegan2023-03-071-1/+1
| |
* | Post release UpdatesWilliam Deegan2023-03-051-1/+1
| |
* | moved the qt tool to qt3. Changed all QT envvars to be now prefixed with QT3William Deegan2023-02-241-3/+6
| |
* | move qt -> qt3 tool, adjust testing as wellWilliam Deegan2023-02-231-5/+5
|/
* Merge remote-tracking branch 'upstream/master' into ↵William Deegan2023-01-298-607/+646
|\ | | | | | | fix_configure_marking_up_to_date
| * Merge branch 'master' of github.com:SCons/scons into ↵William Deegan2022-12-047-432/+396
| |\ | | | | | | | | | add_logging_to_new_parallel_job
| | * Fix interpreter usage in another FW test [skip appveyor]Mats Wichmann2022-11-291-2/+3
| | | | | | | | | | | | Signed-off-by: Mats Wichmann <mats@linux.com>
| | * TestCmdTests: skip all permission fiddling on win32 [skip appveyor]Mats Wichmann2022-11-291-9/+6
| | | | | | | | | | | | Signed-off-by: Mats Wichmann <mats@linux.com>
| | * TestCmdTests symlink fixMats Wichmann2022-11-291-2/+2
| | | | | | | | | | | | Signed-off-by: Mats Wichmann <mats@linux.com>
| | * Merge branch 'testfw/fstringify' of github.com:mwichmann/scons into ↵William Deegan2022-11-292-30/+7
| | |\ | | | | | | | | | | | | testfw/fstringify
| | | * Polish test skipping in a couple of FW tests [skip appveyor]Mats Wichmann2022-11-292-30/+7
| | | | | | | | | | | | | | | | Signed-off-by: Mats Wichmann <mats@linux.com>
| | * | [ci skip] Fix remaining sider complaintsWilliam Deegan2022-11-291-8/+2
| | |/
| | * [ci skip] fix sider complaintsWilliam Deegan2022-11-292-7/+11
| | |
| | * Fix remaining tests failing on win32William Deegan2022-11-292-42/+21
| | |
| | * Fix one Windows-ism in TestCommonTests [skip appveyor]Mats Wichmann2022-11-281-2/+2
| | | | | | | | | | | | Signed-off-by: Mats Wichmann <mats@linux.com>
| | * Fix the framework TestCmdTests on LInux [ skip appveyor]Mats Wichmann2022-11-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Updated TestCommonTests for Py 3.11 [skip appveyor]Mats Wichmann2022-11-271-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Use f-strings in framework and framework testsMats Wichmann2022-11-247-349/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Fix one test in TestCommonTests [ci skip]Mats Wichmann2022-11-221-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * A few more e2e test speedupsMats Wichmann2022-11-161-0/+2
| | | | | | | | | | | | | | | | | | adding DefaultEnvironment calls with no tools Signed-off-by: Mats Wichmann <mats@linux.com>
| | * Maintenance: fix some fiddly checker errorsMats Wichmann2022-11-051-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Fixed taskmaster trace tests. Previously there was an extra line at the end ↵William Deegan2022-10-261-0/+16
| | | | | | | | | | | | 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
| * | Added TestCommon.must_match_file() function. Updated test for ↵William Deegan2022-12-041-0/+21
| |/ | | | | | | --taskmastertracefor (NewParallel/LegacyParallel Jobs). Now uses golden files to compare expected output and output files
| * Fix handling of posix paths containing backslash, and update testsRyan Saunders2022-08-151-5/+1
| |
| * [framework] quiet Python about start() testsMats Wichmann2022-08-071-0/+20
| | | | | | | | | | | | | | | | | | | | | | 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>
| * [framewqork] use subprocess timeoutsMats Wichmann2022-08-064-70/+95
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * framework psutil usage: let the kill proceedMats Wichmann2022-08-041-2/+2
| | | | | | | | | | | | | | 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>
| * Let test framework still run if no psutilMats Wichmann2022-08-041-28/+37
| | | | | | | | | | | | | | | | | | | | | | 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>
| * Test framework improvementsMats Wichmann2022-08-033-16/+11
| | | | | | | | | | | | | | | | | | 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>
| * Post release cleanup. back to dev modeWilliam Deegan2022-07-301-1/+1
| |
| * Merge pull request #4183 from mwichmann/maint/lex_yaccWilliam Deegan2022-07-191-9/+24
| |\ | | | | | | Improvements to lex and yacc tools
| | * Improvements to lex and yacc toolsMats Wichmann2022-06-301-9/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | [Test] drop old exception msgsMats Wichmann2022-07-081-1/+1
| |/ | | | | | | | | | | | | | | | | 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>
| * Merge pull request #4170 from dmoody256/ninja_exit_daemonWilliam Deegan2022-06-141-0/+38
| |\ | | | | | | [NINJA] Added new alias 'shutdown-ninja-scons-daemon' to allow ninja to shutdown the daemon
| | * fix issue when deleting cleaning up deamonDaniel Moody2022-06-141-1/+1
| | |
| | * Fixed some typos. Added skip_test() if psutil is not present for new test. ↵William Deegan2022-06-141-0/+6
| | | | | | | | | | | | Added note to CHANGES.txt/RELEASE.txt that psutil is required for the new test for this function
| | * Merge branch 'master' into ninja_exit_daemonWilliam Deegan2022-06-142-66/+16
| | |\