summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2025-02-28 19:20:53 (GMT)
committerMats Wichmann <mats@linux.com>2025-02-28 19:28:19 (GMT)
commite355bff354f32241d932a68ff702619a9ef3adec (patch)
tree0d08a82dfe7b68c2d571823c5320a3dcad665b3f
parentde74f54cf3b55f4966ed0966af73854c1725e7f2 (diff)
downloadSCons-e355bff354f32241d932a68ff702619a9ef3adec.zip
SCons-e355bff354f32241d932a68ff702619a9ef3adec.tar.gz
SCons-e355bff354f32241d932a68ff702619a9ef3adec.tar.bz2
Framework: fixture methods now handle lists for dstdir
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>
-rw-r--r--CHANGES.txt2
-rw-r--r--testing/framework/TestCmd.py5
2 files changed, 7 insertions, 0 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 60b6bda..efb55ab 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -208,6 +208,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
--debug string - this was previously missed.
- test YACC/live.py fixed - finally started failing on an "old-style"
(K&R flavor) function declaration, updated.
+ - Test framework - add recognizing list-of-path-components for
+ the destination of fixtures too (matches docstrings now).
From Adam Scott:
- Changed Ninja's TEMPLATE rule pool to use `install_pool` instead of
diff --git a/testing/framework/TestCmd.py b/testing/framework/TestCmd.py
index 8e799b9..059ad60 100644
--- a/testing/framework/TestCmd.py
+++ b/testing/framework/TestCmd.py
@@ -1454,6 +1454,9 @@ class TestCmd:
"""
if is_List(srcdir):
srcdir = os.path.join(*srcdir)
+ if is_List(dstdir):
+ dstdir = os.path.join(*dstdir)
+
spath = srcdir
if srcdir and self.fixture_dirs and not os.path.isabs(srcdir):
for dir in self.fixture_dirs:
@@ -1504,6 +1507,8 @@ class TestCmd:
"""
if is_List(srcfile):
srcfile = os.path.join(*srcfile)
+ if is_List(dstfile):
+ dstfile = os.path.join(*dstfile)
srcpath, srctail = os.path.split(srcfile)
spath = srcfile