summaryrefslogtreecommitdiffstats
path: root/test/option
Commit message (Collapse)AuthorAgeFilesLines
* [Test] drop old exception msgsMats Wichmann2022-07-081-41/+11
| | | | | | | | | Minor maintenance to drop a regex group in a few tests (including in a test framework test) which allowed for two different exception messages: one belongs to very old Pythons which are no longer supported by SCons. Signed-off-by: Mats Wichmann <mats@linux.com>
* Fix some more tests to use context-mgr openMats Wichmann2022-03-305-134/+143
| | | | | | Fiddled formatting a bit. Signed-off-by: Mats Wichmann <mats@linux.com>
* Tweak the scons help messageMats Wichmann2022-02-035-21/+19
| | | | | | | | | | | | | Processing changed a bit - some lines can now be joined instead of split (if the usage part is short so the combination will still fit). Dropped the "Ingored for compatibility" chunk from the printout. The usage: message was changed as it didn't mention variables. A number of tests expected the exact value of that line, and so were updated. Updated docstrings (for the API docs). Signed-off-by: Mats Wichmann <mats@linux.com>
* Fixing slider issues identified:Jacob Cassagnol2021-11-091-1/+0
| | | | | | | | | | The linter identified that warnings was unused in hash-format.py The linter found that the skip_test function call was using 2 space indentation (not sure how I managed to do that). Warning was originally added as hash-format gave a warning on ALLOWED_HASH_FORMATS != default That was changed to instead test the different cases directly. option--config.py skips the test if the default algorithm is not MD5 as the hashes used are OS-specific, and supporting it in FIPS mode would be difficult. It's better to just skip this testcase in FIPS mode instead as this specific test is different in that regard to the other FIPS-enabled tests.
* Tests pass in python 3.6 and 3.9 in LinuxJacob Cassagnol2021-11-092-11/+46
| | | | | | | | | | | | | | | Modified failing tests to use the new defaulted .sconsign database based on the hash algorithm For MD5, default database will be .sconsign.dblite For other algorithms the default will be .sconsign_<hashname>.dblite. For all cases where the user changes the hash algorithm used, the database will be .sconsign_<hashname>.dblite (including md5) For sub-scons directories it remains as .sconsign Also added unit-tests for Util.py for the new hash default changes. It's difficult to setup a fips-compliant platform using containers, and instead we mock that. option--config uses multiple types of hash algorithms so was skipped. Removed one f-string (python 3.5 doesn't support those) Corrupt.py is using an explicit .sconsign so that was left as-is, and only the parent default .sconsign was changed for work test 1. A fetch-database name option was added to the testing framework. The unlink_sconsignfile was not updated as no usages of it were found.
* tests: use framework for platform-specific definesMats Wichmann2021-08-241-12/+5
| | | | | | | | Tweaked some tests which directly set values for _exe, _obj, which are available from the framework. Done for consistency, none of these were doing these wrong. Signed-off-by: Mats Wichmann <mats@linux.com>
* Fix reproducible builds. Restore logic respecting SOURCE_DATE_EPOCH when ↵William Deegan2021-08-021-1/+1
| | | | set. Fix version tests to work with updated scons --version output. (Date format changed)
* Merge pull request #3959 from mwichmann/nowarn-missing-sconscriptWilliam Deegan2021-07-122-52/+87
|\ | | | | Change warnings behavior of missing SConscript
| * Change warnings behavior of missing SConscriptMats Wichmann2021-06-182-52/+87
| | | | | | | | | | | | | | If SConscript() is called with must_exist=False, accept the user's will without issuing a warning about the file being missing. Signed-off-by: Mats Wichmann <mats@linux.com>
* | Add --experimental=ninjaWilliam Deegan2021-04-131-3/+4
|/
* better handle all/none and multiple options, expanded tests to cover suchWilliam Deegan2021-04-122-10/+13
|
* Address mwichmann's feedbackWilliam Deegan2021-04-101-3/+3
|
* Clear sider complaints by avoiding it processing tests SConstructWilliam Deegan2021-04-092-1/+1
|
* Add docs for --experimental switchWilliam Deegan2021-04-093-0/+68
|
* Fix copyright header to new standardWilliam Deegan2021-04-091-2/+2
|
* move all the option-* tests into test/option to clean up directory and match ↵William Deegan2021-04-0933-0/+3044
| | | | normal organization.
* Merge branch 'master' into topic/grossag/newhashesWilliam Deegan2021-03-071-5/+5
|\
| * Add timing of sconsign write if --debugMats Wichmann2021-02-081-5/+5
| | | | | | | | | | | | | | | | | | | | | | 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>
* | More improvementsAdam Gross2020-12-152-7/+22
| | | | | | | | | | | | | | 1. Fix failure finding UserError. 2. Fix bad string formatting. 3. Add test case covering passing an invalid hash format. 4. Remove blake2b, as I haven't tested it. We can add it some day if people want it.
* | Address most review feedbackAdam Gross2020-12-142-26/+25
| | | | | | | | Only thing left is to pick a hash format based on the sconsign database name.
* | Change the default sconsign DB file name if the hash is overriddenAdam Gross2020-11-121-2/+22
| | | | | | | | | | | | This was requested in the code review. The sconsign database file name is still .sconsign.dblite if the hash format is not overridden, but if it is, the name will be something like .sconsign_sha256.dblite.
* | Merge branch 'master' into topic/grossag/newhashesAdam Gross2020-11-063-24/+6
|\ \ | |/
| * Fix IS_WINDOWS usage for testWilliam Deegan2020-10-041-1/+2
| |
| * Disable flake8 F401 in testWilliam Deegan2020-10-041-1/+1
| |
| * remove win32api from testWilliam Deegan2020-10-041-10/+5
| |
| * Run autoflake on codeMats Wichmann2020-09-212-14/+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>
* | Two small changes to the test caseAdam Gross2020-08-042-16/+14
| | | | | | | | | | 1. Remove unnecessary writes of f1.in and f2.in. The former is already in the dir fixture and the latter is unused. 2. Untabify SConstruct file.
* | Add support for overriding the default hash formatAdam Gross2020-08-045-0/+81
|/ | | | | | | This change adds support for a new --hash-format parameter that can be used to override the default hash format used by SCons. The default remains MD5, but this allows consumers to opt into SHA1, SHA256, or any other hash algorithm offered by their implementation of hashlib.
* Cleanups in tests and in frameworkMats Wichmann2020-06-141-11/+2
| | | | | | | | | | | | * 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>
* Remove verbose_set calls from testsMats Wichmann2020-03-181-1/+0
| | | | | | | | test.verbose_set() enables verbose mode, can be a useful debugging aid. Shouldn't be left in in production tests, as it creates noise in the test log. Signed-off-by: Mats Wichmann <mats@linux.com>
* rm-py2: Remove "from __future__" from more placesMats Wichmann2020-02-205-12/+6
| | | | | | | | | | | | | | | 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>
* [travis skip] restore to non-debug settings.William Deegan2019-12-271-5/+1
|
* [travis skip] Turn on verbose info when running this test.William Deegan2019-12-271-0/+1
|
* Update debug=action-timestampsMats Wichmann2019-12-071-5/+5
| | | | | | | | | | | | | | | | | | + Rename to action-timestamps (from action_timestamps) for consistency with other compound word options. + Put manpage entry in alphabetical order. + Describe what option does and shorten it (refers to debug=time instead of duplicating it) + Change prints a bit (and tests to match) + Show scons version where added. + Slight adjustment to manpage introduction to debug options. Along the way, fixes a lingering tag mismatch from an earlier documentation PR. Updates PR#3456 Signed-off-by: Mats Wichmann <mats@linux.com>
* Move SConstruct from test to file fixtureWilliam Deegan2019-10-111-5/+1
|
* Added debug option "timestamp", completely overhauled testEdoardo Bezzeccheri2019-10-111-196/+67
| | | | Started from scratch, removing copy of debug-time.py test.
* Added debug option "timestamp", changed option "timestamp" to ↵Edoardo Bezzeccheri2019-10-091-6/+6
| | | | | | "action_timestamps" As per PR review
* Added debug option "timestamp", rename test fileEdoardo Bezzeccheri2019-10-091-0/+0
|
* Added debug option "timestamp", fix shadowing internal fncEdoardo Bezzeccheri2019-10-091-2/+2
|
* Added debug option "timestamp", add testEdoardo Bezzeccheri2019-10-011-0/+234
|
* Tweak a few testsMats Wichmann2019-05-301-22/+19
| | | | | | | | | | | | | "for i in range(len(foo))" idiom changed to iterate directly over lists instead of indexing them. zip() generates the iterator in the case with two lists. reversed() used for the Windows drive-letter test. gdbm is not gone, just renamed. change test to find under either name. Use a context manager for closing StringIO objects opened for capturing standard I/O streams. Signed-off-by: Mats Wichmann <mats@linux.com>
* [PY 3.8] test fixes for file closings, rawstringsMats Wichmann2019-04-2512-38/+40
| | | | | | | 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>
* Speed up option tests for windowsWilliam Deegan2018-09-2631-24/+54
|
* Some further adjustments to missing-sconscript testsMats Wichmann2018-07-301-2/+9
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* Change bug references from tigris -> githubMats Wichmann2018-04-241-1/+1
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* fix py2/3 win32 must_match needed mode='r'William Deegan2017-03-141-1/+1
|
* Fix name shadowing trap brought to light by py3s changes in module import ↵William Deegan2017-03-131-8/+12
| | | | see: http://python-notes.curiousefficiency.org/en/latest/python_concepts/import_traps.html#the-name-shadowing-trap
* remove reference to six package.. unusedWilliam Deegan2016-05-121-1/+0
|
* Commit resolved conflicted merge.Russel Winder2016-04-101-1/+1
|\
| * Fix for backslash being treated as an escape characterThomas Tanner2016-01-301-1/+1
| | | | | | | | | | On my windows system, my python is in c:\apps\32\python. Theres a lot of places where that \32 gets turned into an ascii character and the unit tests don't run.