summaryrefslogtreecommitdiffstats
path: root/testing/framework
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into ninja-generationWilliam Deegan2021-05-241-4/+0
|\
| * Test tweaks to help testing on mingw-only win32 systemsMats Wichmann2021-04-141-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a system where SCons is started from the mingw bash shell, and mingw Python is the interpreter, the secondary self-identification differs. Use that in a few tests which otherwise make the wrong decision. EnvironmentTests used an invalid value for CCFLAGS, and empty string is a better choice. Change a couple of cases where Python code was run directly so it's prefixed by the-Python-in-use, which fails if there is not a Windows-registered program for .py files - we didn't really want to use the Windows-native Python anyway. Signed-off-by: Mats Wichmann <mats@linux.com>
* | Fix ninja tool rules for macos/ar for static libs to skip response files ↵William Deegan2021-04-131-0/+1
|/ | | | for now. Also fix build_libraries to have proper shlib suffix
* 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-139-265/+389
| | | | | | | | | | | | | | | | | | 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>
* fix sider issuesDaniel Moody2021-04-051-1/+0
|
* improved DoubleCacheDir test, added extra cachedir validation check.Daniel Moody2021-04-051-3/+31
|
* 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-082-6/+6
| | | | | | | | | | | 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
* One more "drop py2"ism from test frameworkMats Wichmann2020-10-131-3/+3
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* Drop some more Py2 compat thingsMats Wichmann2020-10-132-7/+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>
* Run autoflake on codeMats Wichmann2020-09-215-7/+0
| | | | | | | | | | Eliminate unneeded imports, and a few unneeded statements - usually "pass" where it is not syntactically needed. A couple of import try blocks were eliminated or changed when they're "cannot happen" due to current floor Python version. 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
|
* A few more edits to testing docMats Wichmann2020-06-251-9/+8
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* Some updates to testing doc. [ci skip]Mats Wichmann2020-06-221-18/+41
| | | | | | Maybe this shouldn't be in git after all? Signed-off-by: Mats Wichmann <mats@linux.com>
* Merge pull request #3706 from dirkbaechle/issue3580-generate-doc-lxmlWilliam Deegan2020-06-212-0/+71
|\ | | | | Update of the documentation toolchain to work properly under Python3
| * Fixed Docbook Tool and updated its tests.Dirk Baechle2020-06-212-0/+71
| |
* | Fix testing subdir usageMats Wichmann2020-06-193-104/+121
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various tests called subdir several times with the same directory, which is pointless. In previous code, this emitted a message though it did not fail. Stop doing that. The dir_fixture() method did some convoluted things to make sure the directories to write to exist, change this around to simplify. The subdir() method already combines the testdir, so dir_fixture doesn't need to. Also handle more cleanly the case of the target directory being an absolute path, which seems to have been intended, but would not work. Also clean up file_fixture() along the same principles. Change the subdir() method to not need to be given an ordered list of directories; instead call os.makedirs on each so intermediate steps are made automatically. Along the way, the print about making a directory that already existed vanishes. Tests which did os.path.join on directory pieces when calling file_fixture no longer do so, since file_fixture (and dir_fixture) do joining on an arg which is a list of paths like many other scons functions. The testing doc was updated to fix some wording and reflect the above changes. Signed-off-by: Mats Wichmann <mats@linux.com>
* Cleanups in tests and in frameworkMats Wichmann2020-06-144-262/+225
| | | | | | | | | | | | * 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>
* classes no longer explicitly inherit from objectMats Wichmann2020-05-241-2/+2
| | | | | | In Python3 this is the default. Signed-off-by: Mats Wichmann <mats@linux.com>
* Some more fixups for project directory movesMats Wichmann2020-05-121-9/+7
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* Some more adjustments to doc build [ci skip]Mats Wichmann2020-05-101-3/+3
| | | | | | | | | | other changes due to path changes rewording in doc howto rst check in the doc flow image used by the howto, as it's tricky to generate Signed-off-by: Mats Wichmann <mats@linux.com>
* Use uuid lib for Visual Studio guidsMats Wichmann2020-05-011-1/+1
| | | | | | | | | | | In the Visual Studio area, use uuid (Python standard library) to generate GUID identifiers instead of specifically using md5. Simplifies things as uuid lib can provide already formatted strings of the form that we need. This is split off from PR #3447 by request. Signed-off-by: Mats Wichmann <mats@linux.com>
* drop runntest.py's run from packages. define SCONS_TOOLS_DIR and use that ↵William Deegan2020-04-091-3/+1
| | | | for scons-time tests
* Fix scons-time tests. Remove subversion testWilliam Deegan2020-04-091-4/+4
|
* [PR #3571] more work on testing document [ci skip]Mats Wichmann2020-02-291-175/+174
| | | | | | | | | | | | | Apply some of the ideas of the Python documentation style guide - headings, indents, etc. Fixed some lingering format problems. Add a table of contents (this will work on the wiki as long as we save the copy there in rest format instead of markdown - that is currently the case). Signed-off-by: Mats Wichmann <mats@linux.com>
* Add comments on skipping tests to framework doc [ci skip]Mats Wichmann2020-02-271-4/+27
| | | | | | | | Build up the skipping tests section by adding a bit of discussion on why you'd want to skip, and on not skipping too much by mocking parts of tests and organizing test code. Signed-off-by: Mats Wichmann <mats@linux.com>
* [PR #3571] fix error and improve docsMats Wichmann2020-02-272-50/+53
| | | | | | | | | | | | sider spotted a cut-n-paste error introduced in the PR (srcdir set instead of srcfile) framework doc now uses directory consistently (over folder, which is a desktop concept rather than a filesystem concept) tweaked wording a bit more Signed-off-by: Mats Wichmann <mats@linux.com>
* Fix some test fixture-handling nits.Mats Wichmann2020-02-262-107/+156
| | | | | | | | | | | | | | | | | | | | | | | | dir-fixture() did not concatenate a source list into a path as the testing doc says it should. fix-fixture() did not either, and the doc didn't say so; now it does (docstring and external testing doc). There was a way to slip through both dir_fixtures and file_fixture with the path invalid - if you have fixture dirs defined, and the dir/file is not found in them, you'll come out of the loop set to the last fixture dir and not try the current dir. This doesn't break anything, just leads to a somewhat misleading message if the fixture really isn't found - the traceback indicates the fixture was not found in whatever the last passed-in fixture dir was. Now it looks like it was not found in the source testing dir. The message can still be improved to be more descriptive. A couple of minor Py2 removals. Testing doc didn't mention FIXTURE_DIRS, so this was added. A bunch of other doc fiddling. Signed-off-by: Mats Wichmann <mats@linux.com>
* rm-py2: Remove "from __future__" from more placesMats Wichmann2020-02-207-41/+34
| | | | | | | | | | | | | | | 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>
* Update TestCommonTests.py to work with py35+ changesWilliam Deegan2020-02-181-23/+25
|
* more unicode cleanup post py27William Deegan2020-02-181-10/+3
|
* Merge branch 'master' into issue-3469William Deegan2020-01-301-0/+3
|\
| * Merge branch 'master' into topic/grossag/pythonscannerAdam Gross2020-01-102-2/+2
| |\
| * \ Merge branch 'master' into topic/grossag/pythonscannerWilliam Deegan2019-12-294-17/+17
| |\ \
| * \ \ Merge branch 'master' into topic/grossag/pythonscannerAdam Gross2019-12-173-4/+4
| |\ \ \
| * \ \ \ Merge branch 'master' into topic/grossag/pythonscannerWilliam Deegan2019-12-011-1/+1
| |\ \ \ \
| * | | | | Add sconstest.skip files and improve test-framework.rst docs in that areaAdam Gross2019-10-251-0/+3
| | | | | |
* | | | | | 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
| |_|_|_|/ |/| | | |