summaryrefslogtreecommitdiffstats
path: root/runtest.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix runtest.py to check SCons dir instead of src dir. Missed this change ↵William Deegan2020-05-101-5/+5
| | | | during repro directory refactor.
* Reorganize the repo. Moved src/engine/SCons to ./SCons to be more in line ↵William Deegan2020-05-061-1/+1
| | | | with current python packaging practices
* Address github review notes and sider issuesWilliam Deegan2020-04-111-20/+2
|
* drop runntest.py's run from packages. define SCONS_TOOLS_DIR and use that ↵William Deegan2020-04-091-78/+38
| | | | for scons-time tests
* Fix scripts dirname typoWilliam Deegan2020-04-091-1/+1
|
* update runtest.py to find scons in scriptsWilliam Deegan2020-04-091-1/+1
|
* Merge branch 'master' into runtest-devmodeWilliam Deegan2020-02-251-147/+166
|\
| * rutest cleanups and subprocess updateMats Wichmann2020-02-241-148/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | - Clean up some things suggested by checkers. - Add a few docsstrings. - Make RuntestBase an abstract class - Eliminate Py2 remnants. - Use subprocess.run for a slightly cleaner interface - don't have to separately do wait or communicate, don't need to set up context manager, and everything returns cleanly in a subprocess.CompletedProcess. Signed-off-by: Mats Wichmann <mats@linux.com>
| * Fix runtest no-exec modeMats Wichmann2020-02-241-1/+4
| | | | | | | | | | | | | | | | Failure to default some values in class initializer caused a downstream problem if running no-exec mode, as one field was added only if running in execute mode. Signed-off-by: Mats Wichmann <mats@linux.com>
* | Change devmode check to not exclude 3.7.0Mats Wichmann2020-02-201-2/+2
| | | | | | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* | Let test runner use new Dev. ModeMats Wichmann2020-02-201-4/+9
|/ | | | | | | Python Development Mode imposes more checks (since Python 3.7). Allow it to optionally be enabled while doing a test run. Signed-off-by: Mats Wichmann <mats@linux.com>
* rm-py2: Remove "from __future__" from more placesMats Wichmann2020-02-201-2/+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>
* Fix runtest.py to only run *Tests.py files under testing as well as under ↵William Deegan2020-02-181-1/+1
| | | | src (unittests)
* Get rid of remaining mktemp callsMats Wichmann2019-12-301-1/+0
| | | | | | | | | | | | Except for Platform/win32.py, the engine code no longer called insecure/deprecated tempfile.mktemp. That location is now also changed to use better methods. A couple of vestiges of old ways (like in comments) cleaned out. A couple of unit tests also converted - these don't have any impact on the scons engine, of course. Signed-off-by: Mats Wichmann <mats@linux.com>
* [PR #3411] fix typo spotted by sider CIMats Wichmann2019-08-021-4/+4
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* Document and polish runtest.pyMats Wichmann2019-08-021-44/+51
| | | | | | | | This is a minor change to runtest, some slight rearrangements, adding a docstring, clarifying a few comments. The subclass of Thread is now more precise in following the Thread constructor. Signed-off-by: Mats Wichmann <mats@linux.com>
* [PR #3330] do not use shell in subproc callsMats Wichmann2019-03-291-14/+16
| | | | | | | | | | The various instances of subprocess.Popen call with shell=True, but this is not necessary, the test command lines don't depend on any shell processing and are complete as constructed. With shell=False, send a list of command words instead of a single string. Signed-off-by: Mats Wichmann <mats@linux.com>
* Runtest improvements for multi-job runsMats Wichmann2019-03-291-160/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main fix: if duing a multi-job run (-j flag is present), collect the test output in runtest and keep the test heading together with the test output, so the information about a given test will not separated in the output. The test number is recorded in the test instance instead of kept as a global. Tests may appear out of order now, but since they may be run "out of order" depending on how fast the various threads complete the jobs they pull off the queue, that just reflects reality. The help message is now the script's docstring, and help prints the docstring along with some other info. This avoids having the options described twice (and going out of sync) - once in the inital comment, once in the help message. A mention of the -j multi-job option is added, was previously missing. Also: one less worker than requested was created due to use of range(1, n) (may have been intentional?). changed to number requested. Also: the lock is taken from the RunTest instance, not from the global lock variable. This must have been intended as the lock is stored in the instance on initialization. The lock was not really declared as a global, it was just assigned in global scope. Also: the test result reporting is now split off into its own function, makes a bit cleaner separation (and facilitates possible changes to the multi-job model in future). Signed-off-by: Mats Wichmann <mats@linux.com>
* Clean up some file opens, regex stringsMats Wichmann2019-03-071-7/+13
| | | | | | | | | | | | | | | | | | Most recent Python (3.8 alpha) spews warnings aplenty about two subjects: unclosed files and strings which look like they have embedded escapes that Python does not recognize. The latter are usually regexes, and it provides a reminder that regular expressions should normally be specified as raw strings, so Python does not attempt to interpret them. Irritating is that even docstrings are flagged, it's not obvious what the right answer is for a docstring which contains, say, a Windows-style path with backslashes. This converts a bunch of opens that are not closed into context manager usage and regex patterns into raw strings. This eliminate about 4000 warnings spewed by Py3.8 (9200 remain). Signed-off-by: Mats Wichmann <mats@linux.com>
* [WIP] for #3304: drop use of -tt if py3Mats Wichmann2019-03-011-0/+2
| | | | | | | | | | 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>
* Drop -tt flag in runtest.pyMats Wichmann2019-03-011-1/+1
| | | | | | | | | | Test runs launch Python with the -tt flag to error on inconsistent tab usage. That flag is no longer part of Python 3, though it is silently accepted and ignored in cpython. In PyPy3, it errors. We have other ways to detect such things now anyway, so just drop. Signed-off-by: Mats Wichmann <mats@linux.com>
* More deletion of _JAVA_OPTIONS to runtest.py from travis startup files.William Deegan2018-08-311-0/+4
|
* Part of previous change restoredMats Wichmann2018-08-301-1/+1
| | | | | somehow the change from if test to try block got partly lost during commit. changing else->except
* Rework the time.clock -> time.perf_counter changeMats Wichmann2018-08-301-3/+2
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* Do not use time.clock for Py3 in runtestMats Wichmann2018-08-301-4/+8
| | | | | | | | | | | | | | | | | | | | | time.clock is deprecated since Python 3.3 and will be removed in Python 3.8. 3.7 started issuing DeprecationWarning, which fails about 16 tests in AppVeyor CI (and running manually), since the warning appears in stderr stream and so real vs expected does not match any longer. Arguably the tests could be fixed to do a different check (contains rather than exactly-equal), but a change needs to be made anyway. use time.perf_counter as the time function for Python 3. This works for Windows and non-Windows; however since this function did not exist in 2.7 (added for 3.3), the Py2 case is left, which selects between time.clock and time.time depending on OS. Note this addresses runtest.py, but not code in bench/, which need attention also. Suggest that be a separate change since it's not failing tests. Signed-off-by: Mats Wichmann <mats@linux.com>
* runtest.py: async is a reserved keyword in python 3.7Gary Oberbrunner2018-07-131-2/+2
| | | | | I don't think the async arg is used anywhere, but I kept it and just changed the name so the tests run.
* move test files from QMTest to testing/framework. QMtest hasn't been used in ↵William Deegan2018-04-301-5/+3
| | | | quite some time
* Fix problem with Install and multiple dirs outside src tree.Gary Oberbrunner2018-01-051-1/+1
| | | | | | | | | | | | In some cases it's possible to get a case where the target path already does exist, but the dir node for it hasn't been updated yet. This fix prevents MkdirFunc from trying to create it when it already exists. Added a testcase which failed before the fix and works after it. Also fixes a problem running tests on Windows, using standard python 3 which is installed in "C:/Program Files/Python36". The python path name has to be escaped in that case. See runtest.py.
* Merge branch 'appveyor' of https://github.com/ajf58/scons into AppveyorCIScriptDaniel Moody2017-12-221-15/+6
|\
| * Threading module should definitely be present. Don't try and soldier on ↵Andrew Featherstone2017-12-201-15/+6
| | | | | | | | without it.
* | adding in JobTests.py workaround with the coverage testing, also updated ↵Daniel Moody2017-12-091-6/+20
|/ | | | runtest.py with the exclude option from Github PR 27.
* Changed to os.pathsep for fixture dirsgrbd2017-06-211-1/+1
|
* Fix the directory seperator for Fixture directories to be windows compatiblegrbd2017-06-201-1/+1
|
* Fix issue where a blank line would lead to runtest.py dropping user into a ↵William Deegan2017-04-091-0/+1
| | | | python shell
* change logic to drop ./ or .\ from front of specified test/testpath so logic ↵William Deegan2017-04-031-1/+7
| | | | to match test or src will work properly. This is mainly just useful on windows when autocompleting paths
* Fix runtest.py to work with win32 paths specified as .\test\xyzWilliam Deegan2017-04-031-0/+3
|
* Use print() function to fix py2/3Craig Rodrigues2017-03-101-2/+2
|
* start some changes to show pass/fail stats along with progressWilliam Deegan2017-02-261-3/+18
|
* Moved fixture directory under #test.William Blevins2016-09-241-1/+1
|
* Initial python3 cut of test/Fortran.William Blevins2016-09-231-2/+2
|
* Allowed for multiple fixture dirs and added default global directory.William Blevins2016-09-231-3/+5
|
* Post merge commit for safety. Building Fortran code works, but tests fail.Russel Winder2015-12-241-13/+2
|\
| * removed several pre-2.7 methods and imports, including some basic refactoringsDirk Baechle2015-12-101-13/+2
| |
* | Added six module as SCons.compat.six, for python3 port.Gary Oberbrunner2014-04-201-3/+2
| |
* | Merged with [default]Stefan Zimmermann2014-03-311-140/+95
|\ \ | |/
| * Fix running tests in subdir as argument to runtest.py, e.g.anatoly techtonik2014-03-241-2/+2
| | | | | | | | python runtest.py test/CC
| * runtest.py: Make sure --runner argument is only passed to unit testsanatoly techtonik2014-03-211-2/+5
| |
| * Make runner for unit tests configurable, add TAPTestRunner that formatsanatoly techtonik2014-03-201-3/+11
| | | | | | | | | | | | output according to TAP protocol http://testanything.org/ runtest.py --runner TestUnit.TAPTestRunner src\engine\SCons\ActionTests.py
| * runtest.py: Remove double check if no tests are found.anatoly techtonik2014-03-201-8/+3
| |
| * runtest.py: Simplify test discovery code (and show where unittests are)anatoly techtonik2014-03-201-20/+31
| |