summaryrefslogtreecommitdiffstats
path: root/testing/framework/TestCmd.py
Commit message (Collapse)AuthorAgeFilesLines
* Add test case with Latin-1 encoded Latex log file. Required fix in the test ↵maiphi2019-11-011-1/+1
| | | | | | | | | framework. In order to make the test work, it was necessary to handle the encoding issue also in the test framework. Otherwise, though the Latex builder can handle the case, the test framework chokes on it.
* test harness: fix TestCmd testsMats Wichmann2019-06-071-38/+106
| | | | | | | | | | | | | | | | | | | | | | This is the companion to PR #3382. The testing/harness/TestCmdTests.py unit tests do not currently pass. Note they are not run by the CI system, or in fact by doing runtests -a, since they're in a directory that is not searched. After these changes, there are no fails. This is a test-only change. The method simple_diff, modeled on difflib functions, is converted to a generator to match difflib, and now has a doctest as well. This means calls to it which aren't going to iterate needs to convert the return with list(), but that just makes usage more consistent, since the calls to difflib.context_diff and difflib.unified_diff already had to do so. Also, the methods that used Google-style docbook markup are changed to REsT-style markup. Our current doc producer, epydoc, does not understand the Google style, and we shouldn't mix styles; can convert them all in bulk later if we switch to Sphinx as the production tool. Signed-off-by: Mats Wichmann <mats@linux.com>
* PY38: Resolve duplicate creation of 'work' subdir which yielded warnings. ↵William Deegan2019-05-301-1/+1
| | | | Also improve exception handling message in test.subdir()
* Merge pull request #3359 from bdbaddog/fortran_issue_3135William Deegan2019-04-271-0/+6
|\ | | | | Fix Issue #3135 - Type Bound procedures in Fortran submodules
| * Remove debug logicWilliam Deegan2019-04-251-1/+0
| |
| * Add initializing fixture_dirs from shell variable FIXTURE_DIRSWilliam Deegan2019-04-251-0/+7
| |
* | [WIP] [PY 3.8] fix more warningsMats Wichmann2019-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | [PR #333] close files to avoid scons-time racesMats Wichmann2019-03-291-7/+6
|/ | | | | | | | | | | | | | 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>
* Fix is/is not syntaxMats Wichmann2019-02-111-1/+1
| | | | | | | | 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>
* Allow TestCmd.diff() to accept lists as well as stringsWilliam Deegan2018-12-061-1/+7
|
* For PR #3231, update some docstrings per reviewMats Wichmann2018-11-051-5/+12
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* Fix some problems found if no MS compiler at allMats Wichmann2018-10-301-1/+4
| | | | | | | | 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>
* Fixes for Java tests on win32William Deegan2018-10-021-1/+2
|
* Fix py3 ResourceWarning in TestCmdMats Wichmann2018-07-241-2/+4
| | | | | | | | | | 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>
* pr-3052: moved some 64 bit logic to TestCmd and used TestCmd system checksDaniel Moody2018-05-251-1/+1
|
* move test files from QMTest to testing/framework. QMtest hasn't been used in ↵William Deegan2018-04-301-0/+1907
quite some time