diff options
author | William Deegan <bill@baddogconsulting.com> | 2018-09-26 02:57:44 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2018-09-26 02:57:44 (GMT) |
commit | e3a56e698a663c309d42d56e1064077d4c5de602 (patch) | |
tree | 4754b0317a2f8524183df52f4bb5a407ceab17d3 /test/Dir | |
parent | 948b7daaad23a943d10ec74d864467d7ff659de9 (diff) | |
download | SCons-e3a56e698a663c309d42d56e1064077d4c5de602.zip SCons-e3a56e698a663c309d42d56e1064077d4c5de602.tar.gz SCons-e3a56e698a663c309d42d56e1064077d4c5de602.tar.bz2 |
More changes to speed up testing on windows.
Diffstat (limited to 'test/Dir')
-rw-r--r-- | test/Dir/Dir.py | 6 | ||||
-rw-r--r-- | test/Dir/PyPackageDir/image/SConstruct | 8 | ||||
-rw-r--r-- | test/Dir/mixed-targets.py | 3 | ||||
-rw-r--r-- | test/Dir/source.py | 3 |
4 files changed, 13 insertions, 7 deletions
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 |