diff options
Diffstat (limited to 'test')
51 files changed, 115 insertions, 49 deletions
diff --git a/test/Builder/TargetSubst.py b/test/Builder/TargetSubst.py index 7d0438c..76ca76c 100644 --- a/test/Builder/TargetSubst.py +++ b/test/Builder/TargetSubst.py @@ -35,7 +35,8 @@ import TestSCons test = TestSCons.TestSCons() test.write('SConstruct', """\ -env = Environment() +DefaultEnvironment(tools=[]) +env = Environment(tools=[]) builder = Builder(action=Copy('$TARGET', '$SOURCE')) tgt = builder(env, target="${SOURCE}.out", source="infile") """) diff --git a/test/Builder/add_src_builder.py b/test/Builder/add_src_builder.py index d5b13c1..e499933 100644 --- a/test/Builder/add_src_builder.py +++ b/test/Builder/add_src_builder.py @@ -38,6 +38,7 @@ import TestSCons test = TestSCons.TestSCons() test.write('SConstruct', """\ +DefaultEnvironment(tools=[]) copy_out = Builder(action = Copy('$TARGET', '$SOURCE'), suffix = '.out', src_suffix = '.mid') @@ -46,7 +47,7 @@ copy_mid = Builder(action = Copy('$TARGET', '$SOURCE'), suffix = '.mid', \ src_suffix = '.in') -env = Environment() +env = Environment(tools=[]) env['BUILDERS']['CopyOut'] = copy_out env['BUILDERS']['CopyMid'] = copy_mid diff --git a/test/Builder/different-actions.py b/test/Builder/different-actions.py index f98db93..f355586 100644 --- a/test/Builder/different-actions.py +++ b/test/Builder/different-actions.py @@ -34,8 +34,9 @@ import TestSCons test = TestSCons.TestSCons(match=TestSCons.match_re) test.write('SConstruct', """\ -e1 = Environment() -e2 = Environment() +DefaultEnvironment(tools=[]) +e1 = Environment(tools=[]) +e2 = Environment(tools=[]) e1.Command('out.txt', [], 'echo 1 > $TARGET') e2.Command('out.txt', [], 'echo 2 > $TARGET') diff --git a/test/Builder/ensure_suffix.py b/test/Builder/ensure_suffix.py index 4515ff6..52fb1d4 100644 --- a/test/Builder/ensure_suffix.py +++ b/test/Builder/ensure_suffix.py @@ -35,7 +35,8 @@ import TestSCons test = TestSCons.TestSCons() test.write('SConstruct', """\ -env = Environment() +DefaultEnvironment(tools=[]) +env = Environment(tools=[]) tbuilder = Builder(action=Copy('$TARGET', '$SOURCE'), suffix='.dll', diff --git a/test/Builder/multi/different-actions.py b/test/Builder/multi/different-actions.py index 66b1e8e..30e98f8 100644 --- a/test/Builder/multi/different-actions.py +++ b/test/Builder/multi/different-actions.py @@ -34,13 +34,14 @@ import TestSCons test = TestSCons.TestSCons(match=TestSCons.match_re) test.write('SConstruct', """\ +DefaultEnvironment(tools=[]) def build(env, target, source): file = open(str(target[0]), 'wb') for s in source: file.write(open(str(s), 'rb').read()) B = Builder(action=Action(build, varlist=['XXX']), multi=1) -env = Environment(BUILDERS = { 'B' : B }, XXX = 'foo') +env = Environment(tools=[], BUILDERS = { 'B' : B }, XXX = 'foo') env2 = env.Clone(XXX = 'var') env.B(target = 'file6.out', source = 'file6a.in') env2.B(target = 'file6.out', source = 'file6b.in') diff --git a/test/Builder/multi/different-environments.py b/test/Builder/multi/different-environments.py index c3e96c2..686e15c 100644 --- a/test/Builder/multi/different-environments.py +++ b/test/Builder/multi/different-environments.py @@ -47,8 +47,9 @@ build(sys.argv[1],sys.argv[2],sys.argv[3:]) """) test.write('SConstruct', """\ +DefaultEnvironment(tools=[]) B = Builder(action=r'%(_python_)s build.py $foo $TARGET $SOURCES', multi=1) -env = Environment(BUILDERS = { 'B' : B }) +env = Environment(tools=[], BUILDERS = { 'B' : B }) env.B(target = 'file03.out', source = 'file03a.in', foo=1) env.B(target = 'file03.out', source = 'file03b.in', foo=2) """ % locals()) diff --git a/test/Builder/multi/different-multi.py b/test/Builder/multi/different-multi.py index dce235e..28002bd 100644 --- a/test/Builder/multi/different-multi.py +++ b/test/Builder/multi/different-multi.py @@ -34,6 +34,8 @@ import TestSCons test = TestSCons.TestSCons(match=TestSCons.match_re) test.write('SConstruct', """\ +DefaultEnvironment(tools=[]) + def build(env, target, source): file = open(str(target[0]), 'wb') for s in source: @@ -47,7 +49,7 @@ def build2(env, target, source): # or how we mess with the Builder internals. B = Builder(action=build, multi=1, name='B') C = Builder(action=build2, multi=1, name='C') -env = Environment(BUILDERS = { 'B' : B, 'C' : C }) +env = Environment(tools=[], BUILDERS = { 'B' : B, 'C' : C }) env.B(target = 'file8.out', source = 'file8.in') env.C(target = 'file8.out', source = 'file8.in') """) diff --git a/test/Builder/multi/different-order.py b/test/Builder/multi/different-order.py index 99a19c2..c423969 100644 --- a/test/Builder/multi/different-order.py +++ b/test/Builder/multi/different-order.py @@ -36,6 +36,7 @@ import TestSCons test = TestSCons.TestSCons(match=TestSCons.match_re) test.write('SConstruct', """\ +DefaultEnvironment(tools=[]) def build(env, target, source): for t in target: file = open(str(target[0]), 'wb') @@ -43,7 +44,7 @@ def build(env, target, source): file.write(open(str(s), 'rb').read()) B = Builder(action=build, multi=1) -env = Environment(BUILDERS = { 'B' : B }) +env = Environment(tools=[], BUILDERS = { 'B' : B }) env.B(target = ['file10a.out', 'file10b.out'], source = 'file10.in') env.B(target = ['file10b.out', 'file10a.out'], source = 'file10.in') """) diff --git a/test/Builder/multi/different-overrides.py b/test/Builder/multi/different-overrides.py index 8eb3e13..6a38a93 100644 --- a/test/Builder/multi/different-overrides.py +++ b/test/Builder/multi/different-overrides.py @@ -34,13 +34,14 @@ import TestSCons test = TestSCons.TestSCons(match=TestSCons.match_re) test.write('SConstruct', """\ +DefaultEnvironment(tools=[]) def build(env, target, source): file = open(str(target[0]), 'wb') for s in source: file.write(open(str(s), 'rb').read()) B = Builder(action=build, multi=1) -env = Environment(BUILDERS = { 'B' : B }) +env = Environment(tools=[], BUILDERS = { 'B' : B }) env.B(target = 'file3.out', source = 'file3a.in', foo=1) env.B(target = 'file3.out', source = 'file3b.in', foo=2) """) diff --git a/test/Builder/multi/different-target-lists.py b/test/Builder/multi/different-target-lists.py index 39e388c..437311f 100644 --- a/test/Builder/multi/different-target-lists.py +++ b/test/Builder/multi/different-target-lists.py @@ -40,6 +40,7 @@ import TestSCons test = TestSCons.TestSCons(match=TestSCons.match_re) test.write('SConstruct', """\ +DefaultEnvironment(tools=[]) def build(env, target, source): for t in target: file = open(str(target[0]), 'wb') @@ -47,7 +48,7 @@ def build(env, target, source): file.write(open(str(s), 'rb').read()) B = Builder(action=build, multi=1) -env = Environment(BUILDERS = { 'B' : B }) +env = Environment(tools=[], BUILDERS = { 'B' : B }) env.B(target = ['file11a.out', 'file11b.out'], source = 'file11a.in') env.B(target = ['file11b.out', 'file11c.out'], source = 'file11b.in') """) diff --git a/test/Builder/multi/error.py b/test/Builder/multi/error.py index 37a012b..2de23d3 100644 --- a/test/Builder/multi/error.py +++ b/test/Builder/multi/error.py @@ -34,13 +34,15 @@ import TestSCons test = TestSCons.TestSCons(match=TestSCons.match_re) test.write('SConstruct', """\ +DefaultEnvironment(tools=[]) + def build(env, target, source): file = open(str(target[0]), 'wb') for s in source: file.write(open(str(s), 'rb').read()) B = Builder(action=build, multi=0) -env = Environment(BUILDERS = { 'B' : B }) +env = Environment(tools=[], BUILDERS = { 'B' : B }) env.B(target = 'file2.out', source = 'file2a.in') env.B(target = 'file2.out', source = 'file2b.in') """) diff --git a/test/Builder/multi/lone-target-list.py b/test/Builder/multi/lone-target-list.py index 40e7dc9..7c02c4a 100644 --- a/test/Builder/multi/lone-target-list.py +++ b/test/Builder/multi/lone-target-list.py @@ -33,6 +33,8 @@ import TestSCons test = TestSCons.TestSCons(match=TestSCons.match_re) test.write('SConstruct', """\ +DefaultEnvironment(tools=[]) + def build(env, target, source): for t in target: file = open(str(target[0]), 'wb') @@ -40,7 +42,7 @@ def build(env, target, source): file.write(open(str(s), 'rb').read()) B = Builder(action=build, multi=1) -env = Environment(BUILDERS = { 'B' : B }) +env = Environment(tools=[], BUILDERS = { 'B' : B }) env.B(target = ['file12a.out', 'file12b.out'], source = 'file12a.in') env.B(target = 'file12a.out', source = 'file12b.in') """) diff --git a/test/Builder/multi/multi.py b/test/Builder/multi/multi.py index b2ceae9..0f83d71 100644 --- a/test/Builder/multi/multi.py +++ b/test/Builder/multi/multi.py @@ -34,13 +34,15 @@ import TestSCons test = TestSCons.TestSCons(match=TestSCons.match_re) test.write('SConstruct', """\ +DefaultEnvironment(tools=[]) + def build(env, target, source): file = open(str(target[0]), 'wb') for s in source: file.write(open(str(s), 'rb').read()) B = Builder(action=build, multi=1) -env = Environment(BUILDERS = { 'B' : B }) +env = Environment(tools=[], BUILDERS = { 'B' : B }) env.B(target = 'file1.out', source = 'file1a.in') env.B(target = 'file1.out', source = 'file1b.in') """) diff --git a/test/Builder/multi/same-actions.py b/test/Builder/multi/same-actions.py index 5695fa3..0b75566 100644 --- a/test/Builder/multi/same-actions.py +++ b/test/Builder/multi/same-actions.py @@ -34,13 +34,15 @@ import TestSCons test = TestSCons.TestSCons(match=TestSCons.match_re) test.write('SConstruct', """\ +DefaultEnvironment(tools=[]) + def build(env, target, source): file = open(str(target[0]), 'wb') for s in source: file.write(open(str(s), 'rb').read()) B = Builder(action=build, multi=1) -env = Environment(BUILDERS = { 'B' : B }) +env = Environment(tools=[], BUILDERS = { 'B' : B }) env2 = env.Clone(DIFFERENT_VARIABLE = 'true') env.B(target = 'file5.out', source = 'file5a.in') env2.B(target = 'file5.out', source = 'file5b.in') diff --git a/test/Builder/multi/same-overrides.py b/test/Builder/multi/same-overrides.py index 95c0759..e51b2ef 100644 --- a/test/Builder/multi/same-overrides.py +++ b/test/Builder/multi/same-overrides.py @@ -45,8 +45,10 @@ build(sys.argv[1],sys.argv[2],sys.argv[3:]) """) test.write('SConstruct', """\ +DefaultEnvironment(tools=[]) + B = Builder(action=r'%(_python_)s build.py $foo $TARGET $SOURCES', multi=1) -env = Environment(BUILDERS = { 'B' : B }) +env = Environment(tools=[], BUILDERS = { 'B' : B }) env.B(target = 'file4.out', source = 'file4a.in', foo=3) env.B(target = 'file4.out', source = 'file4b.in', foo=3) """ % locals()) diff --git a/test/Builder/multi/same-targets.py b/test/Builder/multi/same-targets.py index 714b9da..c800a1c 100644 --- a/test/Builder/multi/same-targets.py +++ b/test/Builder/multi/same-targets.py @@ -34,6 +34,8 @@ import TestSCons test = TestSCons.TestSCons(match=TestSCons.match_re) test.write('SConstruct', """\ +DefaultEnvironment(tools=[]) + def build(env, target, source): for t in target: file = open(str(t), 'wb') @@ -41,7 +43,7 @@ def build(env, target, source): file.write(open(str(s), 'rb').read()) B = Builder(action=build, multi=1) -env = Environment(BUILDERS = { 'B' : B }) +env = Environment(tools=[], BUILDERS = { 'B' : B }) env.B(target = ['file9a.out', 'file9b.out'], source = 'file9a.in') env.B(target = ['file9a.out', 'file9b.out'], source = 'file9b.in') """) diff --git a/test/Builder/non-multi.py b/test/Builder/non-multi.py index baf0ed0..0ddb038 100644 --- a/test/Builder/non-multi.py +++ b/test/Builder/non-multi.py @@ -34,13 +34,15 @@ import TestSCons test = TestSCons.TestSCons(match=TestSCons.match_re) test.write('SConstruct', """ +DefaultEnvironment(tools=[]) + def build(env, target, source): file = open(str(target[0]), 'wb') for s in source: file.write(open(str(s), 'rb').read()) B = Builder(action=build, multi=0) -env = Environment(BUILDERS = { 'B' : B }) +env = Environment(tools=[], BUILDERS = { 'B' : B }) env.B(target = 'file7.out', source = 'file7.in') env.B(target = 'file7.out', source = 'file7.in') env.B(target = 'file8.out', source = 'file8.in', arg=1) diff --git a/test/Builder/same-actions-diff-envs.py b/test/Builder/same-actions-diff-envs.py index b111737..289ee09 100644 --- a/test/Builder/same-actions-diff-envs.py +++ b/test/Builder/same-actions-diff-envs.py @@ -34,13 +34,15 @@ import TestSCons test = TestSCons.TestSCons(match=TestSCons.match_re) test.write('SConstruct', """\ +DefaultEnvironment(tools=[]) + def build(env, target, source): file = open(str(target[0]), 'w') file.write('1') B = Builder(action=build) -env = Environment(BUILDERS = { 'B' : B }) -env2 = Environment(BUILDERS = { 'B' : B }) +env = Environment(tools=[], BUILDERS = { 'B' : B }) +env2 = Environment(tools=[], BUILDERS = { 'B' : B }) env.B('out.txt', []) env2.B('out.txt', []) """) diff --git a/test/Builder/same-actions-diff-overrides.py b/test/Builder/same-actions-diff-overrides.py index dde7dd9..2b7cefe 100644 --- a/test/Builder/same-actions-diff-overrides.py +++ b/test/Builder/same-actions-diff-overrides.py @@ -34,12 +34,14 @@ import TestSCons test = TestSCons.TestSCons(match=TestSCons.match_re) test.write('SConstruct', """\ +DefaultEnvironment(tools=[]) + def build(env, target, source): file = open(str(target[0]), 'w') file.write('1') B = Builder(action=build) -env = Environment(BUILDERS = { 'B' : B }) +env = Environment(tools=[], BUILDERS = { 'B' : B }) env.B('out.txt', [], arg=1) env.B('out.txt', [], arg=2) """) diff --git a/test/Builder/srcdir.py b/test/Builder/srcdir.py index 669c5e1..d7a9e18 100644 --- a/test/Builder/srcdir.py +++ b/test/Builder/srcdir.py @@ -48,6 +48,8 @@ o.close() """) test.write(['src', 'SConstruct'], """\ +DefaultEnvironment(tools=[]) + Command('output', ['file1', File('file2'), r'%(file3)s', 'file4'], r'%(_python_)s cat.py $TARGET $SOURCES', diff --git a/test/Builder/wrapper.py b/test/Builder/wrapper.py index ae62846..3ee9f79 100644 --- a/test/Builder/wrapper.py +++ b/test/Builder/wrapper.py @@ -34,6 +34,8 @@ import TestSCons test = TestSCons.TestSCons() test.write('SConstruct', """ +DefaultEnvironment(tools=[]) + import os.path import string def cat(target, source, env): @@ -49,7 +51,8 @@ def Wrapper(env, target, source): env.Cat(t1, source) t2 = 't2-'+str(target[0]) env.Cat(t2, source) -env = Environment(BUILDERS = {'Cat' : Cat, +env = Environment(tools=[], + BUILDERS = {'Cat' : Cat, 'Wrapper' : Wrapper}) env.Wrapper('f1.out', 'f1.in') env.Wrapper('f2.in') diff --git a/test/CacheDir/CacheDir.py b/test/CacheDir/CacheDir.py index 45c5db5..3d2c3b5 100644 --- a/test/CacheDir/CacheDir.py +++ b/test/CacheDir/CacheDir.py @@ -45,6 +45,7 @@ src_all = test.workpath('src', 'all') test.subdir('cache', 'src') test.write(['src', 'SConstruct'], """\ +DefaultEnvironment(tools=[]) CacheDir(r'%(cache)s') SConscript('SConscript') """ % locals()) @@ -57,7 +58,7 @@ def cat(env, source, target): for src in source: f.write(open(str(src), "r").read()) f.close() -env = Environment(BUILDERS={'Cat':Builder(action=cat)}) +env = Environment(tools=[], BUILDERS={'Cat':Builder(action=cat)}) env.Cat('aaa.out', 'aaa.in') env.Cat('bbb.out', 'bbb.in') env.Cat('ccc.out', 'ccc.in') diff --git a/test/CacheDir/NoCache.py b/test/CacheDir/NoCache.py index b035b44..f0929aa 100644 --- a/test/CacheDir/NoCache.py +++ b/test/CacheDir/NoCache.py @@ -35,6 +35,7 @@ test = TestSCons.TestSCons() test.subdir('cache', 'alpha', 'beta') sconstruct = """ +DefaultEnvironment(tools=[]) import os CacheDir(r'%s') diff --git a/test/CacheDir/SideEffect.py b/test/CacheDir/SideEffect.py index 2ddba31..4eae4c3 100644 --- a/test/CacheDir/SideEffect.py +++ b/test/CacheDir/SideEffect.py @@ -37,6 +37,7 @@ test.subdir('cache', 'work') cache = test.workpath('cache') test.write(['work', 'SConstruct'], """\ +DefaultEnvironment(tools=[]) def copy(source, target): open(target, "w").write(open(source, "r").read()) @@ -51,7 +52,7 @@ def build(env, source, target): CacheDir(r'%(cache)s') Build = Builder(action=build) -env = Environment(BUILDERS={'Build':Build}, SUBDIR='subdir') +env = Environment(tools=[], BUILDERS={'Build':Build}, SUBDIR='subdir') env.Build('f1.out', 'f1.in') env.Build('f2.out', 'f2.in') env.Build('f3.out', 'f3.in') diff --git a/test/CacheDir/VariantDir.py b/test/CacheDir/VariantDir.py index d31b9ed..58918be 100644 --- a/test/CacheDir/VariantDir.py +++ b/test/CacheDir/VariantDir.py @@ -47,7 +47,7 @@ def cat(env, source, target): for src in source: f.write(open(str(src), "r").read()) f.close() -env = Environment(BUILDERS={'Cat':Builder(action=cat)}) +env = Environment(tools=[], BUILDERS={'Cat':Builder(action=cat)}) env.Cat('aaa.out', 'aaa.in') env.Cat('bbb.out', 'bbb.in') env.Cat('ccc.out', 'ccc.in') @@ -65,7 +65,8 @@ test.write(['src', 'ccc.in'], "ccc.in\n") # test.write('SConstruct', """\ -env = Environment(TWO = '2') +DefaultEnvironment(tools=[]) +env = Environment(tools=[], TWO = '2') CacheDir(r'%s') VariantDir('build', 'src', duplicate=0) SConscript('build/SConscript') diff --git a/test/CacheDir/debug.py b/test/CacheDir/debug.py index e3186b0..7e08e0b 100644 --- a/test/CacheDir/debug.py +++ b/test/CacheDir/debug.py @@ -45,6 +45,7 @@ debug_out = test.workpath('cache-debug.out') test.write(['src', 'SConstruct'], """\ +DefaultEnvironment(tools=[]) CacheDir(r'%(cache)s') SConscript('SConscript') """ % locals()) @@ -57,7 +58,7 @@ def cat(env, source, target): for src in source: f.write(open(str(src), "r").read()) f.close() -env = Environment(BUILDERS={'Cat':Builder(action=cat)}) +env = Environment(tools=[], BUILDERS={'Cat':Builder(action=cat)}) env.Cat('aaa.out', 'aaa.in') env.Cat('bbb.out', 'bbb.in') env.Cat('ccc.out', 'ccc.in') diff --git a/test/CacheDir/environment.py b/test/CacheDir/environment.py index e37b999..5d8eb6c 100644 --- a/test/CacheDir/environment.py +++ b/test/CacheDir/environment.py @@ -46,6 +46,7 @@ src_all = test.workpath('src', 'all') test.subdir('cache', 'src') test.write(['src', 'SConstruct'], """\ +DefaultEnvironment(tools=[]) CacheDir(r'%(cache)s') SConscript('SConscript') """ % locals()) @@ -58,7 +59,7 @@ def cat(env, source, target): for src in source: f.write(open(str(src), "r").read()) f.close() -env_cache = Environment(BUILDERS={'Cat':Builder(action=cat)}) +env_cache = Environment(tools=[], BUILDERS={'Cat':Builder(action=cat)}) env_nocache = env_cache.Clone() env_nocache.CacheDir(None) env_cache.Cat('aaa.out', 'aaa.in') diff --git a/test/CacheDir/multi-targets.py b/test/CacheDir/multi-targets.py index 9ca194e..7977ba0 100644 --- a/test/CacheDir/multi-targets.py +++ b/test/CacheDir/multi-targets.py @@ -40,11 +40,12 @@ multiple_bar = test.workpath('multiple', 'bar') multiple_foo = test.workpath('multiple', 'foo') test.write(['multiple', 'SConstruct'], """\ +DefaultEnvironment(tools=[]) def touch(env, source, target): open('foo', 'w').write("") open('bar', 'w').write("") CacheDir(r'%(cache)s') -env = Environment() +env = Environment(tools=[]) env.Command(['foo', 'bar'], ['input'], touch) """ % locals()) diff --git a/test/CacheDir/multiple-targets.py b/test/CacheDir/multiple-targets.py index d7e6ac7..9f94e4c 100644 --- a/test/CacheDir/multiple-targets.py +++ b/test/CacheDir/multiple-targets.py @@ -38,11 +38,12 @@ test = TestSCons.TestSCons() test.subdir('cache') test.write('SConstruct', """\ +DefaultEnvironment(tools=[]) def touch(env, source, target): open('foo', 'w').write("") open('bar', 'w').write("") CacheDir(r'%s') -env = Environment() +env = Environment(tools=[], ) env.Command(['foo', 'bar'], ['input'], touch) """ % (test.workpath('cache'))) diff --git a/test/CacheDir/option--cd.py b/test/CacheDir/option--cd.py index fad5add..20d1184 100644 --- a/test/CacheDir/option--cd.py +++ b/test/CacheDir/option--cd.py @@ -39,6 +39,7 @@ test = TestSCons.TestSCons() test.subdir('cache', 'src') test.write(['src', 'SConstruct'], """ +DefaultEnvironment(tools=[]) def cat(env, source, target): target = str(target[0]) open('cat.out', 'a').write(target + "\\n") @@ -46,7 +47,7 @@ def cat(env, source, target): for src in source: f.write(open(str(src), "r").read()) f.close() -env = Environment(BUILDERS={'Cat':Builder(action=cat)}) +env = Environment(tools=[], BUILDERS={'Cat':Builder(action=cat)}) env.Cat('aaa.out', 'aaa.in') env.Cat('bbb.out', 'bbb.in') env.Cat('ccc.out', 'ccc.in') diff --git a/test/CacheDir/option--cf.py b/test/CacheDir/option--cf.py index bb9d1cc..5e823ae 100644 --- a/test/CacheDir/option--cf.py +++ b/test/CacheDir/option--cf.py @@ -46,7 +46,7 @@ def cat(env, source, target): for src in source: f.write(open(str(src), "r").read()) f.close() -env = Environment(BUILDERS={'Cat':Builder(action=cat)}) +env = Environment(tools=[], BUILDERS={'Cat':Builder(action=cat)}) env.Cat('aaa.out', 'aaa.in') env.Cat('bbb.out', 'bbb.in') env.Cat('ccc.out', 'ccc.in') diff --git a/test/CacheDir/option--cr.py b/test/CacheDir/option--cr.py index 792dede..4ed587c 100644 --- a/test/CacheDir/option--cr.py +++ b/test/CacheDir/option--cr.py @@ -39,6 +39,7 @@ test = TestSCons.TestSCons() test.subdir('cache', 'src') test.write(['src', 'SConstruct'], """ +DefaultEnvironment(tools=[]) def cat(env, source, target): target = str(target[0]) open('cat.out', 'a').write(target + "\\n") @@ -46,7 +47,7 @@ def cat(env, source, target): for src in source: f.write(open(str(src), "r").read()) f.close() -env = Environment(BUILDERS={'Cat':Builder(action=cat)}) +env = Environment(tools=[], BUILDERS={'Cat':Builder(action=cat)}) env.Cat('aaa.out', 'aaa.in') env.Cat('bbb.out', 'bbb.in') env.Cat('ccc.out', 'ccc.in') diff --git a/test/CacheDir/option--cs.py b/test/CacheDir/option--cs.py index 2e37e5a..b73fb70 100644 --- a/test/CacheDir/option--cs.py +++ b/test/CacheDir/option--cs.py @@ -55,6 +55,7 @@ file.close() cache = test.workpath('cache') test.write(['src1', 'SConstruct'], """ +DefaultEnvironment(tools=[]) def cat(env, source, target): target = str(target[0]) open('cat.out', 'a').write(target + "\\n") @@ -62,7 +63,8 @@ def cat(env, source, target): for src in source: f.write(open(str(src), "r").read()) f.close() -env = Environment(BUILDERS={'Internal':Builder(action=cat), +env = Environment(tools=[], + BUILDERS={'Internal':Builder(action=cat), 'External':Builder(action=r'%(_python_)s build.py $TARGET $SOURCES')}) env.External('aaa.out', 'aaa.in') env.External('bbb.out', 'bbb.in') diff --git a/test/CacheDir/readonly-cache.py b/test/CacheDir/readonly-cache.py index db3b3ec..6520106 100755 --- a/test/CacheDir/readonly-cache.py +++ b/test/CacheDir/readonly-cache.py @@ -37,6 +37,7 @@ from stat import * test = TestSCons.TestSCons() test.write(['SConstruct'], """\ +DefaultEnvironment(tools=[]) CacheDir('cache') Command('file.out', 'file.in', Copy('$TARGET', '$SOURCE')) """) diff --git a/test/CacheDir/scanner-target.py b/test/CacheDir/scanner-target.py index c39042e..7df9792 100644 --- a/test/CacheDir/scanner-target.py +++ b/test/CacheDir/scanner-target.py @@ -41,6 +41,7 @@ test = TestSCons.TestSCons() test.subdir('cache') test.write('SConstruct', """\ +DefaultEnvironment(tools=[]) import SCons CacheDir(r'%s') diff --git a/test/CacheDir/source-scanner.py b/test/CacheDir/source-scanner.py index 2359872..f00360d 100644 --- a/test/CacheDir/source-scanner.py +++ b/test/CacheDir/source-scanner.py @@ -43,6 +43,7 @@ cache = test.workpath('cache') test.subdir('cache', 'subdir') test.write(['subdir', 'SConstruct'], """\ +DefaultEnvironment(tools=[]) import SCons CacheDir(r'%(cache)s') diff --git a/test/CacheDir/timestamp-match.py b/test/CacheDir/timestamp-match.py index afc3f63..4b64137 100644 --- a/test/CacheDir/timestamp-match.py +++ b/test/CacheDir/timestamp-match.py @@ -33,6 +33,7 @@ import TestSCons test = TestSCons.TestSCons() test.write(['SConstruct'], """\ +DefaultEnvironment(tools=[]) Decider('timestamp-match') CacheDir('cache') Command('file.out', 'file.in', Copy('$TARGET', '$SOURCE')) diff --git a/test/CacheDir/timestamp-newer.py b/test/CacheDir/timestamp-newer.py index 8a47fec..618f467 100644 --- a/test/CacheDir/timestamp-newer.py +++ b/test/CacheDir/timestamp-newer.py @@ -33,6 +33,7 @@ import TestSCons test = TestSCons.TestSCons() test.write(['SConstruct'], """\ +DefaultEnvironment(tools=[]) Decider('timestamp-newer') CacheDir('cache') Command('file.out', 'file.in', Copy('$TARGET', '$SOURCE')) diff --git a/test/Decider/Environment.py b/test/Decider/Environment.py index 7c609ee..58cd57b 100644 --- a/test/Decider/Environment.py +++ b/test/Decider/Environment.py @@ -34,8 +34,9 @@ import TestSCons test = TestSCons.TestSCons() test.write('SConstruct', """ +DefaultEnvironment(tools=[]) import os.path -env = Environment() +env = Environment(tools=[]) env.Command('file.out', 'file.in', Copy('$TARGET', '$SOURCE')) def my_decider(dependency, target, prev_ni): return os.path.exists('has-changed') diff --git a/test/Decider/MD5-timestamp.py b/test/Decider/MD5-timestamp.py index f8776c3..6fcdb42 100644 --- a/test/Decider/MD5-timestamp.py +++ b/test/Decider/MD5-timestamp.py @@ -36,7 +36,8 @@ import TestSCons test = TestSCons.TestSCons() test.write('SConstruct', """\ -m = Environment() +DefaultEnvironment(tools=[]) +m = Environment(tools=[]) m.Decider('MD5-timestamp') m.Command('content1.out', 'content1.in', Copy('$TARGET', '$SOURCE')) m.Command('content2.out', 'content2.in', Copy('$TARGET', '$SOURCE')) diff --git a/test/Decider/Node.py b/test/Decider/Node.py index cdd3e35..c1910de 100644 --- a/test/Decider/Node.py +++ b/test/Decider/Node.py @@ -33,6 +33,7 @@ import TestSCons test = TestSCons.TestSCons() test.write('SConstruct', """ +DefaultEnvironment(tools=[]) import os.path file_in = File('file.in') file_out = File('file.out') diff --git a/test/Decider/default.py b/test/Decider/default.py index f05e869..5d0a452 100644 --- a/test/Decider/default.py +++ b/test/Decider/default.py @@ -33,6 +33,7 @@ import TestSCons test = TestSCons.TestSCons() test.write('SConstruct', """ +DefaultEnvironment(tools=[]) import os.path Command('file.out', 'file.in', Copy('$TARGET', '$SOURCE')) def my_decider(dependency, target, prev_ni): diff --git a/test/Decider/mixed.py b/test/Decider/mixed.py index 5598468..08daa7d 100644 --- a/test/Decider/mixed.py +++ b/test/Decider/mixed.py @@ -34,9 +34,10 @@ import TestSCons test = TestSCons.TestSCons() test.write('SConstruct', """ +DefaultEnvironment(tools=[]) import os.path -denv = Environment() -env = Environment() +denv = Environment(tools=[]) +env = Environment(tools=[]) n1_in = File('n1.in') n2_in = File('n2.in') n3_in = File('n3.in') diff --git a/test/Decider/switch-rebuild.py b/test/Decider/switch-rebuild.py index 45becbe..d2b288d 100644 --- a/test/Decider/switch-rebuild.py +++ b/test/Decider/switch-rebuild.py @@ -34,12 +34,13 @@ import TestSCons test = TestSCons.TestSCons(match=TestSCons.match_re_dotall) base_sconstruct_contents = """\ +DefaultEnvironment(tools=[]) Decider('%s') def build(env, target, source): open(str(target[0]), 'wt').write(open(str(source[0]), 'rt').read()) B = Builder(action=build) -env = Environment(BUILDERS = { 'B' : B }) +env = Environment(tools=[], BUILDERS = { 'B' : B }) env.B(target='switch.out', source='switch.in') """ diff --git a/test/Decider/timestamp.py b/test/Decider/timestamp.py index 8389745..e528d77 100644 --- a/test/Decider/timestamp.py +++ b/test/Decider/timestamp.py @@ -37,11 +37,12 @@ import TestSCons test = TestSCons.TestSCons() test.write('SConstruct', """\ -m = Environment() +DefaultEnvironment(tools=[]) +m = Environment(tools=[]) m.Decider('timestamp-match') m.Command('match1.out', 'match1.in', Copy('$TARGET', '$SOURCE')) m.Command('match2.out', 'match2.in', Copy('$TARGET', '$SOURCE')) -n = Environment() +n = Environment(tools=[]) n.Decider('timestamp-newer') n.Command('newer1.out', 'newer1.in', Copy('$TARGET', '$SOURCE')) n.Command('newer2.out', 'newer2.in', Copy('$TARGET', '$SOURCE')) diff --git a/test/Decider/unknown.py b/test/Decider/unknown.py index ec24eff..9f79da3 100644 --- a/test/Decider/unknown.py +++ b/test/Decider/unknown.py @@ -34,6 +34,7 @@ import TestSCons test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) test.write('SConstruct', """\ +DefaultEnvironment(tools=[]) Decider('fiddle-dee-dee') """) diff --git a/test/Depends/no-Builder.py b/test/Depends/no-Builder.py index f55fcf9..7e04bc9 100644 --- a/test/Depends/no-Builder.py +++ b/test/Depends/no-Builder.py @@ -34,7 +34,8 @@ test = TestSCons.TestSCons() # test.write('SConstruct', """\ -env = Environment() +DefaultEnvironment(tools=[]) +env = Environment(tools=[]) file1 = File('file1') file2 = File('file2') env.Depends(file1, [[file2, 'file3']]) diff --git a/test/Dir/Dir.py b/test/Dir/Dir.py index 2e8204c..e726b94 100644 --- a/test/Dir/Dir.py +++ b/test/Dir/Dir.py @@ -35,7 +35,8 @@ import TestSCons test = TestSCons.TestSCons() test.write('SConstruct', """ -env = Environment(FOO = 'fff', BAR = 'bbb') +DefaultEnvironment(tools=[]) +env = Environment(tools=[], FOO = 'fff', BAR = 'bbb') print(Dir('ddd')) print(Dir('$FOO')) print(Dir('${BAR}_$BAR')) @@ -58,12 +59,13 @@ scons: `.' is up to date. test.write('SConstruct', """\ +DefaultEnvironment(tools=[]) import os def my_mkdir(target=None, source=None, env=None): os.mkdir(str(target[0])) MDBuilder = Builder(action=my_mkdir, target_factory=Dir) -env = Environment() +env = Environment(tools=[]) env.Append(BUILDERS = {'MD':MDBuilder}) env.MD(target='sub1', source=['SConstruct']) env.MD(target='sub2', source=['SConstruct'], OVERRIDE='foo') diff --git a/test/Dir/PyPackageDir/image/SConstruct b/test/Dir/PyPackageDir/image/SConstruct index 90d2a80..7e841ac 100644 --- a/test/Dir/PyPackageDir/image/SConstruct +++ b/test/Dir/PyPackageDir/image/SConstruct @@ -13,17 +13,19 @@ def TestPyPackageDir(env, modname): relpath = relpath.replace(os.sep, '/')
print(relpath)
+DefaultEnvironment(tools=[])
+
print("Test identification of directory for a given python package")
-env = Environment()
+env = Environment(tools=[])
TestPyPackageDir(env, 'testmod1')
TestPyPackageDir(env, 'testmod2')
TestPyPackageDir(env, 'submod1.testmod3')
TestPyPackageDir(env, 'submod1.submod2.testmod4')
print("Test parameter substitution")
-env = Environment(FOO = 'submod1.submod2.testmod4')
+env = Environment(tools=[], FOO = 'submod1.submod2.testmod4')
TestPyPackageDir(env, '${FOO}')
-env = Environment(FOO = 'submod1.submod2', BAR = 'testmod4')
+env = Environment(tools=[], FOO = 'submod1.submod2', BAR = 'testmod4')
TestPyPackageDir(env, '${FOO}.${BAR}')
sys.path = oldsyspath
diff --git a/test/Dir/mixed-targets.py b/test/Dir/mixed-targets.py index 9702e40..3389746 100644 --- a/test/Dir/mixed-targets.py +++ b/test/Dir/mixed-targets.py @@ -46,12 +46,13 @@ def copier(target, source, env): shutil.copytree(str(source[0]), 'build') return 0 +DefaultEnvironment(tools=[]) Copier = Builder(action = copier, target_scanner = SCons.Defaults.DirEntryScanner, target_factory = Entry, source_factory = Entry) -env = Environment(BUILDERS = {'Copier': Copier}) +env = Environment(tools=[], BUILDERS = {'Copier': Copier}) env.Copier(['build/dir', 'build/file1'], ['src']) """) diff --git a/test/Dir/source.py b/test/Dir/source.py index c272c8f..5fe917d 100644 --- a/test/Dir/source.py +++ b/test/Dir/source.py @@ -42,6 +42,7 @@ test.subdir('tstamp', [ 'tstamp', 'subdir' ], 'cmd-content', [ 'cmd-content', 'subdir' ]) test.write('SConstruct', """\ +DefaultEnvironment(tools=[]) def writeTarget(target, source, env): f=open(str(target[0]), 'w') f.write("stuff\\n") @@ -52,7 +53,7 @@ test_bld_dir = Builder(action=writeTarget, source_factory=Dir, source_scanner=DirScanner) test_bld_file = Builder(action=writeTarget) -env = Environment() +env = Environment(tools=[]) env['BUILDERS']['TestDir'] = test_bld_dir env['BUILDERS']['TestFile'] = test_bld_file |