| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TestCmd.dir_fixture and TestCmd.file_fixture are described as accepting a
list for both srcdir and dstdir. For example, the docstring for `dir_fixture`:
srcdir or dstdir may be a list, in which case the elements are first
joined into a pathname.
However, the implementation only handled this for srcdir/srcfile.
Added the same stanza for dstdir/dstfile..
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code in testing/framework/TestSCons.py attempted to handle an
ImportError if ninja is not available. However, when running individual
test files from the scons/test/ directory, this directory is included as
the first entry in sys.path. When this happens, the `import ninja`
statement succeeds, finding the scons/test/ninja/ directory and treating
it as a package. This results in an AttributeError being thrown later
attempting to access `ninja.BIN_DIR`, rather than an ImportError.
I have confirmed that this change now allows `./runtest.py test/Help.py`
to succeed, even when ninja is not installed.
|
|
|
|
|
|
|
|
|
| |
Insted of really long strings of repeated characters, use f-strings to
compose the "expected" output for the banner function tests. This keeps
the code formatter from breaking things an ugly way, and is really more
"accurate" anyway.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
| |
Imcludes test snippets contained in docstrings, too.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Since Python 2.2, the object returned by an os.stat() call presents
attributes matching the 10-tuple of stat values. Use these instead of
indexing into the tuple.
As usual for non-removed tests, minor tweaks made if needed -
copyright header and DefautlEnvironment() call for performance.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|
|
|
| |
longer works starting with python ninja package version 1.11.1.2
|
|\
| |
| | |
Remove Python 3.6 support
|
| | |
|
|/ |
|
|\
| |
| |
| | |
Manually resolve conflicts in CHANGES.txt.
|
| |
| |
| |
| | |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Although validation tests are not normally run as root, there may be
cicrumstances when it happens - one known case is when the test suite
is run as part of a particular Linux distros package construction.
It isn't too hard to avoid the few places where we counted on something
failing because of permissions, which don't if the user is root -
added a few skips.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
| |
| |
| |
| |
| |
| | |
Changes:
* Detect solution file names and nodes in projects argument list. Behavior based on the auto_filter_projects value. By default, raise an exception.
* Update TestSConsMSVS and multiple project auto_build_solution tests.
* Update documentation, CHANGES.txt, and RELEASE.txt.
|
| |
| |
| |
| | |
test Environments.
|
| |
| |
| |
| | |
in all test files.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
multi-project and solution builds.
Tool/msvs.py:
* Add "projectguid" argument to MSVSProject to enable user-defined GUID assignment per-project for multiple project solutions.
* Project GUID priority: (1) MSVSProject "projectguid" argument, (2) SCons env MSVS_PROJECT_GUID value, (3) internally generated GUID. SCons env MSVS_PROJECT_GUID value should not be used for multiple project solutions without using projectguid arguments (otherwise, multiple projects will use the same GUID).
* Store the project GUID as a node Tag when generating the MSVSProject and retrieve the project GUIDs using GetTag when generating the solution.
* Move project node processing to a function so it can be called from multiple code locations.
* Filter out solution nodes from project list (bugfix: auto_build_solution enabled and returned value used as project list includes auto-generated solution as a Project in the solution file).
* Check for variant directory build of MSVSSolution and adjust src node accordingly similar to MSVSProject code. Bug fix: the solution file is generated in the build directory instead of the source directory. The placeholder solution file is now generated in the build directory and the solution file is generated in the source folder similar to the handling of project files.
* Add project dsp nodes to the dsw source node list. This appears to always cause the project files to be generated before the solution files which is necessary to retrieve the project GUIDs for use in the solution file. This does change the behavior of clean for a project generated with auto_build_solution disabled and explicit solution generation: when the solution file is cleaned, the project files are also cleaned. The tests for vs 6.0-7.1 were changed accordingly.
testing/framework/TestSConsMSVS.py:
* Add known project GUID for single project tests and two known project GUIDs for dual project tests.
* Add projectguid to MSVSProject arguments for single project test SConstruct/SConscript files.
* Add PROJECT_BASENAME replaceable field to expected generated project file templates.
* Add dual project and single solution templates.
Tests:
* Use known project guid for most tests which prevents have to hard-code generated GUIDs.
* Add 4 (2x2) tests using two projects for combinations of auto_build_solutions settings (2) and variant directories (2).
* Add 2 tests using two projects which use default GUID generation with and without variant directories.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
testing/framework/TestSConsMSVS.py:
* Add default project GUID
* Pass MSVS_PROJECT_GUID via environment
* Add AdditionalOptions Condition to expected vcx project file
* Fix vs version number for vc version 14.3
* Fix expected platform toolset version
SCons/Tool/msvs.py:
* User environment MSVS_PROJECT_GUID when creating project files info
* Fix writing Visual Studio 15 for VS2015
* Add .vcxprof as an expected suffix for assigning the name to the file base name
Fix early exit after vc version 8.0 (exit at the end of first loop execution) in:
* test/MSVS/vs-files.py
* test/MSVS/vs-scc-files.py
* test/MSVS/vs-scc-legacy-files.py
* test/MSVS/vs-variant_dir.py
Tests:
* Modify tests using TestSConsMSVS to add MSVS_PROJECT_GUID to the environment in the generated SConstruct/SConscript files.
* Fix: delete env['PYTHON_ROOT'] before next loop iteration in test/MSVS/vs-files.py.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most interesting is an "api change" - the test methods test.must_exist()
and test.must_exist_one_of() now take an optional 'message' keyword
argument which is passed on to fail_test() if the test fails.
The regex used to test an exception is now working for Python 3.13,
and enabled conditionally - the "enhanced error reporting" changed, in
a way that made it easy to reuse the existing regex (if somebody wants
to take a shot at unifying them, more power!).
Also one unexpected issue was found - one of the check routines does
"output = os.newline.join(output)", but there is no os.newline. Could use
os.linesep, but just changed it to the Python newline character.
Some annotations added, and some cleanup done on possibly unsafe uses
- mainly that self.stderr() and selt.stdout() *can* return None, but
several places in the code just did string operations on the return
unconditionally. There's already precendent- other places did do a check
before using, so just extended the concept to possibly vulnerable palces.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous commit introduced a change to how the framework handled
arguments, which necessitated some changes in the variables code.
It got too complicated, too many places would need too much logic.
Just accept that the test.run(arguments="...") will never be quite
like the same arguments on the CLI, and just use lists to avoid
things being broken on embedded spaces - those won't be split.
Many tests arleady do this, so it's nothing new. Added a comment
in TestCmd to make it more clear.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix ListVariable handling of a quoted variable value containing spaces.
As a side effect of splitting the former monolithic converter/validator
for ListVariable into separate callbacks, it became possible for
subst to be called twice. The ListVariable converter produces an
instance of a _ListVariable container, and running subst on that
result ends up losing information, so avoid doing so.
While developing a test for this, it turned out the test framework
also didn't handle a quoted argument containing a space, so that
a test case passing arguments to scons via "run(arguments='...')"
could end up with scons seeing a different (broken) command line
than scons invoked with the same arguments typing to a shell prompt.
A regex is now used to more accurately split the "arguments" parameter,
and a unit test was added to the framework tests to validate.
The framework fix had a side effect - it was possible that when run
as part of the test suite, the Variables package could receive a value
still wrapped in quotes, leading to string mismatches ('"with space"'
is not equal to 'with space'), so ListVariable now strips wrapping
quote marks.
Also during testing it turned out that the earlier fix for #4241,
allowing a Variable to declare the value should not be subst'd,
introduced problems for two types which assumed they would always
be passed a string. With subst=False, they could be passed a default
value that had been specified as a bool. Fixed to not fail on that.
Fixes #4585
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|
|
|
|
|
|
|
| |
Don't """code block""" % locals() if there's not actually a substitution
in the code block. While there, fix any old-style file headers,
and add a DefaultEnvironment call if not present.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|\ |
|
| |
| |
| |
| | |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Python 3.13.0b1 added a warning when the extraction filter is
not specified. The filter aregument (to extract() and extractall())
was added in 3.12, but with no noise. Once the warning was added, the
scons-time tests began to fail - this is a continuation of the work Red
Hat did for RHEL 8 and RHEL 9 starting with Python 3.9. Supplying the
filter quiets the warning, which also worked for the RHEL case.
The tarfile and zipfile usage now uses a context manager (both
objects can be used this way since Python 3.2 or so).
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|\ \
| |/
| |
| |
| |
| |
| | |
Manually resolved conflicts:
* CHANGES.txt
* RELEASE.txt
* test/MSVS/vs-14.3-exec.py
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Several typos found by PyCharm spellchecking
Changed style of document heading
Changed a couple of words elsewhere.
No substantive changes this time.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |\
| | |
| | | |
Deprecate Python 3.6 support.
|
| | |\ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
No claim is made about when it will actually be dropped,
but some notice seems polite.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Simplify/clarify some usage of Python version strings. Dropped a couple
which refer to unsupported versions.
While looking at version usage, it became clear one of the SWIG tests
wasn't doing the right thing - it has a special case for Windows, where
the way the path to the Python library is constructed would only work
for the python.org release, not the Store version. Since we compute
this information correclty in the test framework, and the test already
called that routine - before ignoring the results - just use that instead.
Though it turns out the framework didn't quite do the right thing either,
returning a bare lib name without the library suffix - fixed that, too.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The try block in TestCmd.start() is removed, it interferes with
other things. TestCommon.start is supposed to handle exceptions,
so inserting more stuff at a lower level (parent class) made
a mess of the framework tests.
Clean up a complaint with later Pythons (3.12+), and include
(incomplete) new regex for Python 3.13+.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Test framework now reports a FAIL if the subprocess call to run
the test was aborted by the operating system (this is particularly
for Windows when antivirus could reject running a compiled test binary).
Previously these failures were not recorded in the fails list and so
were easy to miss.
- Test framework now uses a subdirectory named "scons" below the base
temporary directory. This gives something invariant to tell antivirus
software to ignore without having to exclude the tmpdir itself.
- MSVS "live" tests of project files (e.g. test/MSVS/vs-14.3-exec.py)
adjusted to look for the generated executable with an exe sufffix.
This had recently started failing on the line::
test.run(program=test.workpath('sub dir', 'foo'), stdout="foo.c\n")
as somehow "sub dir\foo" was created, and then "foo.exe" was not
matched causing the binary not to execute and failing the test.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|\ \
| |/
| |
| |
| |
| | |
Manually resolved:
* CHANGES.txt
* RELEASE.txt
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
re.sub's count and flags arguments are transitioning to keyword-only.
With 3.13a5, usage as positional args issues a DeprecationWarning,
which caused one SCons test to fail. Updated in test framework
and in bin/update-release-info.py.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | |
|
| | |
|
| |
| |
| |
| | |
calls in msvs executable test scripts, re-order CHANGES.txt.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Most remaining http: references are either changed to https: or removed
or changed in case they were also stale links, and a replacement was
findable.
Does not affect schema and stylesheet references, which can remain http:
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
| |
| |
| |
| |
| | |
Looking at wrong exceptions for possible rmdir failures
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Changes:
* An express installation of the IDE binary is used when no other IDE edition is detected.
* A full development edition (e.g., Professional) of VS2008 is elected before a Visual C++ For Python edition.
* Update detection order in README.rst and remove hard tabs.
* Minor fixes lingering from original VSWHERE implementation where all call chains were not updated when the environment argument was added.
|
|/
|
|
|
|
|
| |
Manually resolve conflicts:
* CHANGES.txt
* RELEASE.txt
* SCons/Tool/MSCommon/vc.py
|
|
|
|
|
|
|
| |
Some of these got done in the tool conversion, some not,
so picked up the rest manually.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$ pyupgrade --py36-plus $(<filelist)
Here's mostly what it's done:
- No more 'stringliteral'.encode('utf-8'): now b'stringliteral'
- No more unicode literals
- the default open mode is 'r', leaves out if default
- some f-string conversions (if shorter)
- catch OSError instead of subclasses
- no more mention of "object"
- generator expression instead of list comp. when safe
- a few tests had a shebang but actually began with blank line
- remove coding: utf-8 comment, per pep 3120 this is the default now
Manually - if a file in test/ was modified, then did the copyright
header conversion.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|