summaryrefslogtreecommitdiffstats
path: root/test/Actions
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2019-12-27 18:18:00 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2019-12-27 18:18:00 (GMT)
commit3b7df24765e56e6723f249081b65ab4215451863 (patch)
tree10b505cf9cdc16c6f1c22c98a43a3e6c8f8b49fd /test/Actions
parent0dfb7626a5b15007be01fec23966a5a28c4159f3 (diff)
downloadSCons-3b7df24765e56e6723f249081b65ab4215451863.zip
SCons-3b7df24765e56e6723f249081b65ab4215451863.tar.gz
SCons-3b7df24765e56e6723f249081b65ab4215451863.tar.bz2
Speed up some tests by setting (Default)Environment(tools=[])
Diffstat (limited to 'test/Actions')
-rw-r--r--test/Actions/pre-post-fixture/work2/SConstruct4
-rw-r--r--test/Actions/pre-post-fixture/work3/SConstruct2
-rw-r--r--test/Actions/pre-post.py6
3 files changed, 8 insertions, 4 deletions
diff --git a/test/Actions/pre-post-fixture/work2/SConstruct b/test/Actions/pre-post-fixture/work2/SConstruct
index 6f03a53..e0af0ee 100644
--- a/test/Actions/pre-post-fixture/work2/SConstruct
+++ b/test/Actions/pre-post-fixture/work2/SConstruct
@@ -1,8 +1,8 @@
def b(target, source, env):
with open(str(target[0]), 'wb') as f:
f.write((env['X'] + '\n').encode())
-env1 = Environment(X='111')
-env2 = Environment(X='222')
+env1 = Environment(X='111', tools=[])
+env2 = Environment(X='222', tools=[])
B = Builder(action = b, env = env1, multi=1)
print("B =", B)
print("B.env =", B.env)
diff --git a/test/Actions/pre-post-fixture/work3/SConstruct b/test/Actions/pre-post-fixture/work3/SConstruct
index d523295..e0aa257 100644
--- a/test/Actions/pre-post-fixture/work3/SConstruct
+++ b/test/Actions/pre-post-fixture/work3/SConstruct
@@ -5,7 +5,7 @@ def post(target, source, env):
def build(target, source, env):
with open(str(target[0]), 'wb') as f:
f.write(b'build()\n')
-env = Environment()
+env = Environment(tools=[])
AddPreAction('dir', pre)
AddPostAction('dir', post)
env.Command('dir/file', [], build)
diff --git a/test/Actions/pre-post.py b/test/Actions/pre-post.py
index cd0bfb4..4d22b07 100644
--- a/test/Actions/pre-post.py
+++ b/test/Actions/pre-post.py
@@ -43,6 +43,7 @@ test.write(['work1', 'SConstruct'], """
import os.path
import stat
+# DefaultEnvironment(tools=[])
env = Environment(XXX='bar%(_exe)s')
def before(env, target, source):
@@ -103,13 +104,16 @@ test.must_match(['work3', 'dir', 'file'], "build()\n")
# work4 start
test.write(['work4', 'SConstruct'], """\
+
+DefaultEnvironment(tools=[])
+
def pre_action(target, source, env):
with open(str(target[0]), 'ab') as f:
f.write(('pre %%s\\n' %% source[0]).encode())
def post_action(target, source, env):
with open(str(target[0]), 'ab') as f:
f.write(('post %%s\\n' %% source[0]).encode())
-env = Environment()
+env = Environment(tools=[])
o = env.Command(['pre-post', 'file.out'],
'file.in',
r'%(_python_)s build.py ${TARGETS[1]} $SOURCE')