summaryrefslogtreecommitdiffstats
path: root/testing/framework/TestSCons.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix sider warning typo and docstring for skip_if_not_msvcMats Wichmann2021-04-131-1/+1
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* Test harness add a from_fw to skip callsMats Wichmann2021-04-131-134/+143
| | | | | | | | | | | | | | | | | | Main functional change is a new kwarg to skip_test() to allow calls from inside the framework to skip an additional line of traceback in the skip output - i.e. don't just skip the entry for skip_test, but also the function in the fw that called it. Other functional change is for the try block in skip_if_not_msvc() (which is one of the internal callers of skip_test() mentioned for the other change) to catch Exception, thus avoiding system-existing exceptions that were caught by the existing bare except, which caused the skip to not actually skip. The remainder of the patch is docstring reformatting, some minor code reformats, top-of-file license blocks, etc. Signed-off-by: Mats Wichmann <mats@linux.com>
* Deprecate Python 3.5.Mats Wichmann2021-03-281-1/+1
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* Add timing of sconsign write if --debugMats Wichmann2021-02-081-2/+2
| | | | | | | | | | | A line is now emitted showing sconsign sync time if --debug=time Some calls to time.time replaced with time.perf_counter, where the objective was to time sections of code (i.e. where there wasn't an actual need to get time-since-epoch) - Python recommends this as getting the best-available timer. Signed-off-by: Mats Wichmann <mats@linux.com>
* [ci skip] update post releaseWilliam Deegan2021-01-191-1/+1
|
* feat: Adds ZIP_OVERRIDE_TIMESTAMPDavid H2021-01-181-3/+33
|
* Add custom up_to_date for TimeSCons to handle individual SConscript timing ↵William Deegan2020-10-161-1/+26
| | | | output during null build run
* Drop some more Py2 compat thingsMats Wichmann2020-10-131-5/+2
| | | | | | | | | | | | | Change exception type in a a couple of try block to what could go wrong, Py3 would not raise UniCodeDecodeError for these cases One try-import of StringIO module sconsign does not need a decode that was claimed as compat hack Remove some sys.version_info checks Use more modern way to get Python details in test frawmework AddMethod updated and RenameFunction dropped - it had become a one-liner and had no clients other than AddMethod (never exposed as public) Signed-off-by: Mats Wichmann <mats@linux.com>
* Merge pull request #3731 from mwichmann/warn-to-sconswarnWilliam Deegan2020-07-191-1/+1
|\ | | | | Change Warning to SConsWarning
| * [PR #3731] more adjustments to WarningsMats Wichmann2020-07-071-1/+1
| | | | | | | | | | | | | | Replace the arguments-to-WarningClass converter. Improve docstrings. Signed-off-by: Mats Wichmann <mats@linux.com>
* | Post releaseWilliam Deegan2020-07-171-1/+1
| |
* | Post relaaseWilliam Deegan2020-07-171-1/+1
|/
* reset to development modeWilliam Deegan2020-07-041-3/+3
|
* Cleanups in tests and in frameworkMats Wichmann2020-06-141-1/+1
| | | | | | | | | | | | * Some Py2/Py3 compat blocks were simplified to Py3 only * some sequences of define-cleaup-function + atexit.register were changed to use the decorator (this works if func needs to take no arguments) * Lightly update a bunch of docstrings in TestCmd, and reformat a few places, towards the style we're generally using now. * call_python() in TestCmdTests was modernized to use subprocess.run Signed-off-by: Mats Wichmann <mats@linux.com>
* rm-py2: Remove "from __future__" from more placesMats Wichmann2020-02-201-1/+0
| | | | | | | | | | | | | | | 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>
* Improve debug output when configure test fails stdout checkWilliam Deegan2020-01-301-7/+5
|
* Updated to expected configure context temporary and generated files to match ↵William Deegan2020-01-301-23/+20
| | | | new scheme to add contents and action hash to file name to avoid mistakenly reusing the wrong temp file based on changing the order and/or number of the configure tests being run between successive runs
* updates to make tests pass on windowsWilliam Deegan2020-01-221-1/+1
|
* Updated TestSCons and test/Configure/option--config.py to work with new ↵William Deegan2020-01-221-26/+188
| | | | configure temporary file naming via content and action hash
* PEP8William Deegan2020-01-211-142/+148
|
* syntax fixups suggested by PyCharmMats Wichmann2019-12-231-1/+1
| | | | | | | | | | | | | | Drop unneeded parens. Drop trailing semicolons. Triple double-quote docstrings. Regexes drop unneeded escapes. Spaces around parens, braces: remove/add. Some one-tuples get their missing closing comma. A couple of sets use set init syntax {foo} instead of set([iter]) now. And a fiddle in Node to reduce lookup time on md5 signature functions (came about because of a line-too-long issue, initially) Signed-off-by: Mats Wichmann <mats@linux.com>
* Update version stringsWilliam Deegan2019-12-171-1/+1
|
* Changes for 3.1.1 release3.1.1William Deegan2019-08-081-1/+1
|
* changes for release 3.1.0William Deegan2019-07-211-1/+1
|
* [PR #3345] fix a few more Py3.8 problemsMats Wichmann2019-04-251-12/+12
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* [PY 3.8] test fixes for file closings, rawstringsMats Wichmann2019-04-251-26/+26
| | | | | | | On a linux host (missing some things that may be on the Travis CI setup), Py3.8a3 now shows 19 fails, 1048 pass, with 84 Warning: messages. Signed-off-by: Mats Wichmann <mats@linux.com>
* Fix problems with jdk detectionMats Wichmann2019-04-141-9/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | The java tool common routine finds a jdk by doing a filesystem glob. This had a problem on windows in the case a specific version is requested, because the format of name of the jdk directory has changed with JDK 9 - there is a dash between jdk and the version string. The glob which does not attempt to match a version was general enough not to trip on this, but with a version to match it would never match jdk-9 or higher. The test harness then asks the found javac what version it is, and the parsing of that did not work as expected once version numbers became double-digit, as the regex was for a single digit followed by a dot. The outcome is for 11.0.2 we get back '11' instead of '11.0'. Change the regex to match any number of digits followed by dot. The Repository/RMIC.py change is to align with an earlier change to Java/RMIC.py, but the may not be needed after the change to regex just described. Clean up some of the Java tool routines for consistency (there was no functional change outside of JavaCommon.py) Docstrings added or updated in several places. Signed-off-by: Mats Wichmann <mats@linux.com>
* Release file updates for Release 3.0.53.0.5William Deegan2019-03-261-1/+1
|
* [skip ci] reset to develop mode3.0.5a2William Deegan2019-03-051-1/+1
|
* [WIP] for #3304: drop use of -tt if py3Mats Wichmann2019-03-011-1/+3
| | | | | | | | | | 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>
* Clean up some tests: use context managersMats Wichmann2019-02-141-1/+2
| | | | | | | | | Plenty of complaints coming from Python 3.8alpha on unclosed files. Targeted those areas which intersect with PyPy failures - this changeset reduces the PyPy fails by 17 on the local test environment. So this affects both Issue #3299 and the PyPy support project. Signed-off-by: Mats Wichmann <mats@linux.com>
* Updated files per ReleaseConfig for 3.0.4 releaseWilliam Deegan2019-01-201-1/+1
|
* updates from update-release-info for 3.0.3 releaseWilliam Deegan2019-01-061-1/+1
|
* Updates for 3.0.2 releaseWilliam Deegan2019-01-011-1/+1
|
* Merge pull request #3236 from ptomulik/whereisWilliam Deegan2018-11-091-17/+5
|\ | | | | attempt fixing TestSCons.where_is() for win32
| * attempt fixing TestSCons.where_is() for win32Paweł Tomulik2018-11-061-17/+5
| |
* | For PR #3231, update some docstrings per reviewMats Wichmann2018-11-051-7/+16
| | | | | | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* | Fix some problems found if no MS compiler at allMats Wichmann2018-10-301-1/+1
|/ | | | | | | | 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>
* Additional fixes for SWIG testsMats Wichmann2018-10-161-7/+16
| | | | | | | | | | | | Two tests were missing the raw-string marker when defining the Python include path. TestSCons:get_platform_python_info needed some rework for Windows, it was failing to find the python library if running in a virtual environment. Also removed a try-block; sys.version_info is standard since Python 2.0 and so does not need wrapping. Signed-off-by: Mats Wichmann <mats@linux.com>
* Fixes for Java tests on win32William Deegan2018-10-021-2/+6
|
* Add test for 1.8. Modularize java tests and move files to a fixture. Change ↵William Deegan2018-10-011-0/+4
| | | | TestCommon's options_arguments to keep passed lists and not join them into a string.
* add missed TestCmd.py changesMats Wichmann2018-08-171-10/+14
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* Move checking for python header to common locationMats Wichmann2018-08-151-18/+37
| | | | | | | | | | | A previous change added a check for Python.h in one SWIG test which did not have it which turns that test into a skip instead of a fail if the header is not installed. It was pointed out that having 12 tests check for the same thing might be optimised by putting the check in the routine which returns info about the python development environment, so this change makes that modification. Signed-off-by: Mats Wichmann <mats@linux.com>
* fix TestSCons.get_platform_python_info() to work on win32, had omitted some ↵William Deegan2018-07-101-4/+1
| | | | needed imports
* Fix for py2.7 + 3.5+William Deegan2018-07-081-5/+8
|
* stop using obsolete distutils.sysconfig to find python include, link ↵William Deegan2018-07-081-2/+12
| | | | paths,and library names. Use sysconfig.get_config_var() calls instead
* Change TestSCons's get_platform_python_info() to use the python which ↵William Deegan2018-07-061-1/+1
| | | | runtest.py was run with instead of blindly searching for python vis test.where_is(). This fixes an issue where the swig tests work fine with py3.6 but not with py2.7 on a win64 box with both installed, runtest launched via py -2 runtest.py ...
* Add wildcards so we'll catch both 32 and 64 bit versions of java on windows.William Deegan2018-05-111-2/+2
|
* Add some reasonable default windows paths to find java.William Deegan2018-05-111-11/+20
|
* move test files from QMTest to testing/framework. QMtest hasn't been used in ↵William Deegan2018-04-301-0/+1642
quite some time