| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Improvements to lex and yacc tools
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The mocked tools mylex.py and myyacc.py now understand the file-generation
options, and generate a dummy file with predictable contents, for
checking. This allows more testing of the path through the SCons support
for these two without needing live commands.
New tests added which invoke the file-generation options, and make
sure the extra files are created, and that SCons detects and tracks
the added targets. Work is done in a subdirectory, which exposes some
existing known inconsistent behavior (the regular generated file goes
in the subdir per the LEXCOM and YACCOM generated line, while the ones
generated from commandline options go in the topdir) - but we're going
to allow that behavior to continue for backwards compat.
Same fix applied to yacc tool that PR #4168 did for lex - do subst_list()
instead of subst() to preserve spaces in paths. That fix left the lex
tool unable to pass the new test, as it could not see the individual
arguments in the FLAGS variable, which was solved by indexing into the
subst'd list so we can iterate over the args again.
Test and tool cleanup; add DefaultEnvironment calls, etc.
Note this mentions, but does not address the problem described in issue 4154.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|/
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| | |
[NINJA] Added new alias 'shutdown-ninja-scons-daemon' to allow ninja to shutdown the daemon
|
| | |
|
| |
| |
| |
| | |
Added note to CHANGES.txt/RELEASE.txt that psutil is required for the new test for this function
|
| |\ |
|
| | | |
|
| | |
| | |
| | |
| | | |
daemon
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
Where string pasting is done using test or interpreter paths, make sure
they're pasted as raw strings to avoid problems on the Windows platform,
where the likely presence of '\Users` is likely to cause a unicode error.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | |
|
|/
|
|
| |
KEY=VAL for each item in that dict. Also changed to unittest.main() form TestSuite()
|
|
|
|
| |
to stdout after the original message
|
|\ |
|
| |
| |
| |
| | |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|/
|
|
|
|
|
|
|
| |
A couple of unittest methods that a few SCons tests use have
been marked deprecated in Python 3.11, with replacements provided.
Partial fix for #4162, do not close just off this PR.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
| |
If the framework wait_for() method actually times out, it tries to return
stdout and stderr by calling the framework methods of those names.
The stdout() method was protected against the message not having been
captured (as is the case on timeout). Updated the stderr() method to
use the same technique.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
| |
- super used where direct call to superclass existed
- convert a few older-style super() (two-argument) uses
- in a few places, where there was an intersection with a super change,
variables that override a builtin (e.g. "dict") were renamed.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|\
| |
| | |
Fix tests to not hang on Windows with bad .py assoc
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For systems where the association for .py files is not to an actual
Python interpreter, those few cases where we need to run a Python script
directly as a program don't work. This could be because the association
was never set up, or because some other program (e.g. Visual Studio Code)
has taken it over. In some cases may appear to "hang" because the
alternate program is waiting for user interaction
runtest.py now has a mechanism to check (thanks to Brett Cannon for
providing this incantation). It isn't super precise (looks for the
substring "py" in the queried association), but should work out.
It sets an environment variable which the test framework can read
and as a result set a flag which individual tests can read.
Two tests in scons-time which had previously been set to skip-if-win32
now look at this flag instead. Three tests in sconsign now also look at
this flag. This allows a clean run on my dev box with VS Code having
taken over the .py association.
Various things can break if the environment used to fire off
Windows processes doesn't contain %UserProfile%. Added this to the
short list of passthrough env vars. Apparently an environment without
this value is now considered invalid (it blew up the erroneously
launched VS Code, but we've apparently been lucky it hasn't blown
up more things - believe there was also a report of a problem
with the Visual Studio setup scripts).
A little extra cleanup:
- a couple of Py2-isms were cleaned out (Script/Main.py and in the test
framework)
- The paths to look for site-scons were rewritten (part of this was
another Py2-ism), and the system path changed a bit - the old path is
still checked, and the manpage updated to reflect this.
- runtest.py dropped the unused whereis functions.
- the three sconsign tests now use f-string formatting, mostly as an
experiment to see how easy it is to convert.
Fixes #4053
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Still failing on:
SCons/UtilTests.py
test/Configure/ConfigureDryRunError.py
test/Configure/implicit-cache.py
test/Configure/option--config.py
test/option/hash-format.py
test/option/option-n.py
test/question/Configure.py
These tests all have hardcoded md5 sums or use md5 directly
Next commit should fix it so the md5-specific tests are skipped if fips mode detected.
Also will figure out a way around the hardcoded m5sums.
|
| |
|
|
|
|
|
|
|
|
| |
There is a new stub java/javac/jar/java_home on the Mac, probably after
the Oracle license change to Java (though that part is only a guess).
Updated the detection code to handle the new way.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
| |
for now. Also fix build_libraries to have proper shlib suffix
|
|
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
|
|
|
| |
output during null build run
|
|
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| | |
Change Warning to SConsWarning
|
| |
| |
| |
| |
| |
| |
| | |
Replace the arguments-to-WarningClass converter.
Improve docstrings.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
| |
Maybe this shouldn't be in git after all?
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|\
| |
| | |
Update of the documentation toolchain to work properly under Python3
|