summaryrefslogtreecommitdiffstats
path: root/test/AS/AS.py
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2020-06-18 00:49:48 (GMT)
committerMats Wichmann <mats@linux.com>2020-06-19 18:45:48 (GMT)
commitfb051bdc215244d352c2067d93d30ea64200e71f (patch)
treebf329cb8d20466db9797b0e4b55a4348672e61df /test/AS/AS.py
parentdf1e47c805c0fd1c6d5e60ea00b465188db6163e (diff)
downloadSCons-fb051bdc215244d352c2067d93d30ea64200e71f.zip
SCons-fb051bdc215244d352c2067d93d30ea64200e71f.tar.gz
SCons-fb051bdc215244d352c2067d93d30ea64200e71f.tar.bz2
Fix testing subdir usage
Various tests called subdir several times with the same directory, which is pointless. In previous code, this emitted a message though it did not fail. Stop doing that. The dir_fixture() method did some convoluted things to make sure the directories to write to exist, change this around to simplify. The subdir() method already combines the testdir, so dir_fixture doesn't need to. Also handle more cleanly the case of the target directory being an absolute path, which seems to have been intended, but would not work. Also clean up file_fixture() along the same principles. Change the subdir() method to not need to be given an ordered list of directories; instead call os.makedirs on each so intermediate steps are made automatically. Along the way, the print about making a directory that already existed vanishes. Tests which did os.path.join on directory pieces when calling file_fixture no longer do so, since file_fixture (and dir_fixture) do joining on an arg which is a list of paths like many other scons functions. The testing doc was updated to fix some wording and reflect the above changes. Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test/AS/AS.py')
-rw-r--r--test/AS/AS.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/AS/AS.py b/test/AS/AS.py
index 380afe3..56a1498 100644
--- a/test/AS/AS.py
+++ b/test/AS/AS.py
@@ -40,7 +40,7 @@ _exe = TestSCons._exe
test = TestSCons.TestSCons()
test.file_fixture('mylink.py')
-test.file_fixture(os.path.join('fixture', 'myas.py'))
+test.file_fixture(['fixture', 'myas.py'])
test.write('SConstruct', """
env = Environment(LINK = r'%(_python_)s mylink.py',