summaryrefslogtreecommitdiffstats
path: root/SCons/SConfTests.py
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of raising exceptions entirelyRaymond Li2024-03-281-1/+1
| | | | In favor of just returning status for uniform behavior
* Add additional CheckFunc test cases and update change notice for CheckFunc.Joseph Brill2023-12-121-1/+14
| | | | | | Changes: * add additional CheckFunc test cases to SCons/SConfTests.py * add paragraph tags around change notice for CheckFunc funcargs argument in doc/man/scons.xml
* Fix 4320: add an optional argument list string to the configure CheckFunc ↵Joseph Brill2023-11-241-0/+2
| | | | | | method. Add an optional argument list string so the generated function argument list matches the function's prototype when including a header file.
* Followon to PR #4348: more bool fixesMats Wichmann2023-06-161-6/+6
| | | | | | | | | | | | | | Manually fixed up some things related to bool, e.g. simple functions which just did "return 1" were interpreted by the tool as returning int, when bool was really the intent. Functions/methods named like "is*", "has*", "exists", "rexists" (and others) are now pretty consistently marked as returning bool. A couple of minor alignments of branched definitions, and a couple of docstring adjustments made. If Tools which had old heading style were touched, they got the new style. Signed-off-by: Mats Wichmann <mats@linux.com>
* Drop dead code from unit testsMats Wichmann2023-05-221-2/+0
| | | | | | | | | | Remove dead code: some mocked classes in unit tests had methods which have been removed from the Node class they're mocking, there's no need to shadow those any more as there are no callers. The methods are depends_on (base functionality removed in 2005 ) and is_pseudeo_derived (base functionality removed in 2006). Signed-off-by: Mats Wichmann <mats@linux.com>
* Add some cheap return and parameter annotationsMats Wichmann2023-05-011-41/+41
| | | | | | | | | | | | | | | | | Use: https://github.com/JelleZijlstra/autotyping to add "safe" return annotations. Where a parameter has a default value that is an obvious scalar type (bool, int, str, etc.) add those annotations as well. Also fixed two small bugs that popped up when sanity-checking with mypy. One in FortranCommon, where a return had been previously annotated to be a tuple of Action, which should be ActionBase - Action is the factory function, not the base class. The other was a typo in the error raised in _add_cppdefines - the message was formatted with the value of "define" which should have been "defines". Signed-off-by: Mats Wichmann <mats@linux.com>
* Merge pull request #4297 from mwichmann/CheckLib-uniqueWilliam Deegan2023-01-291-11/+70
|\ | | | | Add unique kwarg to CheckLibs
| * Add unique kwarg to CheckLibsMats Wichmann2023-01-271-11/+70
| | | | | | | | | | | | | | | | | | | | Minor tweak to CheckFunc - the dummy prototype should have a dummy arg list too (comment from Python setuptools discussion). Might as well fail the official way: #error instead of C syntax error. Fixes #2768 Signed-off-by: Mats Wichmann <mats@linux.com>
* | Merge remote-tracking branch 'upstream/master' into ↵William Deegan2023-01-291-2/+15
|\ \ | |/ | | | | fix_configure_marking_up_to_date
| * Add "append" kwarg to two configure checksMats Wichmann2023-01-241-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add append=True/False to CheckLib, CheckLibWithHeader in SConf. The "implementation", Conftest.CheckLib, already accepted this kwarg, but it could not be passed from an SConscript using the offical API. Updated manpage to describe and expanded a unit test to check. Fixes #2767 Additionally, clarified some things in manpage, including a recent user confusion about how to call CheckFunc. 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-0/+2
|/ | | | info cleared after check.
* [ci skip] fix sider complaintWilliam Deegan2022-03-221-1/+1
|
* Separated just the CheckMember() checker from yuzhicang's PR #4100, changed ↵William Deegan2022-03-211-0/+21
| | | | code to have same return values as rest of checkers, updated test to work with that.
* fix failing sconf testDaniel Moody2021-07-211-1/+1
|
* Fix some imports and other checker warningsMats Wichmann2021-05-051-2/+0
| | | | | | | | | | | | | * Removed a number of imports reported as unused. * Reorganize imports in a few places. * Checker reported warnings problems ("Instantiating an exception, but not raising it, has no effect"): serveral tool modules instantiated a warning class thinking (?) it would issue the warning; changed these to the standard use - calling the warn() function with the warnclass as an arg. * Tool modules that were touched had the copyright header munging applied. * Removed irritating "####" lines from gettext and msgfmt tools. Signed-off-by: Mats Wichmann <mats@linux.com>
* Remove some "star imports"Mats Wichmann2020-11-161-1/+1
| | | | | | | | | | | | | | Usually, it's unit tests that do this, and it's not really crucial to kill those off, but checkers do complain, including sider if you touch anything in one of those files. In SCons/Environment,py, removed all SCons.Util prefixes, than turned the import of Util into a star import, running a tool on that then changes it to import only the used symbols from Util. Since there are lots, that ought to be a small performance win, since it doesn't have to do namespace lookups on SCons.Util. Signed-off-by: Mats Wichmann <mats@linux.com>
* Update some copyright strings and drop __revision__ [skip appveyor]Mats Wichmann2020-09-231-4/+2
| | | | | | | | | | | | | | | | | | Touches the first and second levels of SCons (except SCons.Tool), not tests or docs which remain TODO. Make sure docstring is first non-comment content, eliminate cases where docstring is set elsewhere but assigns to __doc__ - this approach of course worked inside Python, but confuses various tools. Some module-level docstrings modified a bit, in particular the convention of having the name of the module as the first line is dropped, replaced by a summary description going there instead - this improves the look in the API Docs, which otherwise display something like: SCons.Foo - SCons.Foo Signed-off-by: Mats Wichmann <mats@linux.com>
* Add .attributes to Dummy MyNode class used for testsWilliam Deegan2020-07-261-0/+4
|
* classes no longer explicitly inherit from objectMats Wichmann2020-05-241-3/+3
| | | | | | In Python3 this is the default. Signed-off-by: Mats Wichmann <mats@linux.com>
* Reorganize the repo. Moved src/engine/SCons to ./SCons to be more in line ↵William Deegan2020-05-061-0/+783
with current python packaging practices