summaryrefslogtreecommitdiffstats
path: root/testing/framework
Commit message (Collapse)AuthorAgeFilesLines
* 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
| | |\
| | * | install psutil for testing and fix sider complaintsDaniel Moody2022-06-071-1/+1
| | | |
| | * | Added new alias 'shutdown-ninja-scons-daemon' to allow ninja to shutdown the ↵Daniel Moody2022-06-071-0/+32
| | | | | | | | | | | | | | | | daemon
| * | | Test Framework tests: Windows fixesMats Wichmann2022-06-142-62/+62
| | |/ | |/| | | | | | | | | | | | | | | | | | | 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>
| * | Fix sider complaintsWilliam Deegan2022-06-131-1/+1
| | |
| * | Added test for test.run()'s arguments set to a dict which will expand into ↵William Deegan2022-06-132-66/+16
| |/ | | | | | | KEY=VAL for each item in that dict. Also changed to unittest.main() form TestSuite()
| * If no newline at end of message supplied to skip_test(), then we write one ↵William Deegan2022-06-031-0/+2
| | | | | | | | to stdout after the original message
| * Merge branch 'master' into 4162-python-311-unittestsMats Wichmann2022-05-301-1/+6
| |\
| * | Fix some Py 3.11 depr warns in testsMats Wichmann2022-05-302-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Fix for #2757, non conftest nodes involved in configure checks now get node ↵Daniel Moody2022-05-261-2/+2
| |/ |/| | | | | info cleared after check.
* | Skip new content-timestamp-symlink test on win32Mats Wichmann2022-05-061-1/+6
|/ | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* test framework: fix exception on timeoutMats Wichmann2022-04-051-5/+9
| | | | | | | | | | 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>