summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2025-02-15 21:21:12 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2025-02-15 21:21:12 (GMT)
commit663165b149f013a10590a4e3b97ee340770fe228 (patch)
tree21e7be4de5ad005e5f66b5d590347ebe2d6e9054
parent9bcbf7b45fc8ebd7e791e1ae58fe4444f3240d96 (diff)
downloadSCons-663165b149f013a10590a4e3b97ee340770fe228.zip
SCons-663165b149f013a10590a4e3b97ee340770fe228.tar.gz
SCons-663165b149f013a10590a4e3b97ee340770fe228.tar.bz2
Simplify use of dir_fixture and some test logic. Added DefaultEnvironment(tools=[]) to speed up on windows
-rw-r--r--test/Configure/CheckLibWithHeader_extra_libs.py14
-rw-r--r--test/Configure/fixture/checklib_extra/SConstruct1
2 files changed, 4 insertions, 11 deletions
diff --git a/test/Configure/CheckLibWithHeader_extra_libs.py b/test/Configure/CheckLibWithHeader_extra_libs.py
index eef5c0e..5e7d450 100644
--- a/test/Configure/CheckLibWithHeader_extra_libs.py
+++ b/test/Configure/CheckLibWithHeader_extra_libs.py
@@ -33,18 +33,10 @@ from pathlib import Path
from TestSCons import TestSCons, dll_, _dll
test = TestSCons(match=TestSCons.match_re_dotall)
+test.dir_fixture(['fixture', 'checklib_extra'],)
-# This is the first library project
-libA_dir = Path(test.workdir) / "libA"
-libA_dir.mkdir()
-libA = str(libA_dir / (dll_ + 'A' + _dll)) # for existence check
-test.dir_fixture(['fixture', 'checklib_extra', 'libA'], 'libA')
-
-# This is the second library project, depending on the first
-libB_dir = Path(test.workdir) / "libB"
-libB_dir.mkdir()
-libB = str(libB_dir / (dll_ + 'B' + _dll)) # for existence check
-test.dir_fixture(['fixture', 'checklib_extra', 'libB'], 'libB')
+libA = f"libA/{dll_}A{_dll}"
+libB = f"libB/{dll_}B{_dll}"
test.run(arguments='-C libA')
test.must_exist(libA)
diff --git a/test/Configure/fixture/checklib_extra/SConstruct b/test/Configure/fixture/checklib_extra/SConstruct
index 177dc16..82bf5aa 100644
--- a/test/Configure/fixture/checklib_extra/SConstruct
+++ b/test/Configure/fixture/checklib_extra/SConstruct
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: MIT
#
# Copyright The SCons Foundation
+DefaultEnvironment(tools=[])
env = Environment(
CPPPATH=['#'],