summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2018-09-26 18:03:34 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2018-09-26 18:03:34 (GMT)
commitdb67204cfdb270dbc08f36813e20c0a41c225b25 (patch)
tree60c3a7ec077325d4656b557474d2fd763fa1c6d0
parent8fca42cbacd48d6f832721363813d9b3d1e3163d (diff)
downloadSCons-db67204cfdb270dbc08f36813e20c0a41c225b25.zip
SCons-db67204cfdb270dbc08f36813e20c0a41c225b25.tar.gz
SCons-db67204cfdb270dbc08f36813e20c0a41c225b25.tar.bz2
Speed up option tests for windows
-rw-r--r--test/option/d.py3
-rw-r--r--test/option/debug-count.py1
-rw-r--r--test/option/debug-duplicate.py3
-rw-r--r--test/option/debug-findlibs.py1
-rw-r--r--test/option/debug-includes.py1
-rw-r--r--test/option/debug-memoizer.py3
-rw-r--r--test/option/debug-memory.py3
-rw-r--r--test/option/debug-multiple.py1
-rw-r--r--test/option/debug-objects.py3
-rw-r--r--test/option/debug-pdb.py3
-rw-r--r--test/option/debug-prepare.py3
-rw-r--r--test/option/debug-presub.py4
-rw-r--r--test/option/debug-stacktrace.py3
-rw-r--r--test/option/debug-time.py4
-rw-r--r--test/option/environment-overrides.py2
-rw-r--r--test/option/help-options.py2
-rw-r--r--test/option/md5-chunksize.py6
-rw-r--r--test/option/no-print-directory.py2
-rw-r--r--test/option/option_profile.py1
-rw-r--r--test/option/print-directory.py2
-rw-r--r--test/option/repository.py3
-rw-r--r--test/option/srcdir.py3
-rw-r--r--test/option/stack-size.py3
-rw-r--r--test/option/taskmastertrace.py3
-rw-r--r--test/option/tree-all.py1
-rw-r--r--test/option/tree-derived.py1
-rw-r--r--test/option/tree-lib.py1
-rw-r--r--test/option/warn-dependency.py3
-rw-r--r--test/option/warn-duplicate-environment.py3
-rw-r--r--test/option/warn-misleading-keywords.py3
-rw-r--r--test/option/warn-missing-sconscript.py3
31 files changed, 54 insertions, 24 deletions
diff --git a/test/option/d.py b/test/option/d.py
index 055769a..36be02b 100644
--- a/test/option/d.py
+++ b/test/option/d.py
@@ -32,7 +32,7 @@ import TestSCons
test = TestSCons.TestSCons()
-test.write('SConstruct', "")
+test.write('SConstruct', "DefaultEnvironment(tools=[])\n")
test.run(arguments = '-d .',
stderr = "Warning: ignoring -d option\n")
@@ -44,6 +44,7 @@ test.pass_test()
test.subdir('subdir')
test.write('SConstruct', """
+DefaultEnvironment(tools=[])
env = Environment()
env.Program(target = 'aaa', source = 'aaa.c')
env.Program(target = 'bbb', source = 'bbb.c')
diff --git a/test/option/debug-count.py b/test/option/debug-count.py
index b82a434..2b5b745 100644
--- a/test/option/debug-count.py
+++ b/test/option/debug-count.py
@@ -44,6 +44,7 @@ except ImportError:
test.write('SConstruct', """
+DefaultEnvironment(tools=[])
def cat(target, source, env):
open(str(target[0]), 'wb').write(open(str(source[0]), 'rb').read())
env = Environment(BUILDERS={'Cat':Builder(action=Action(cat))})
diff --git a/test/option/debug-duplicate.py b/test/option/debug-duplicate.py
index df2723e..8b9810d 100644
--- a/test/option/debug-duplicate.py
+++ b/test/option/debug-duplicate.py
@@ -33,7 +33,8 @@ test = TestSCons.TestSCons()
test.subdir('sub1')
test.write('SConstruct', """\
-env=Environment()
+DefaultEnvironment(tools=[])
+env=Environment(tools=[])
Export('env')
env.SConscript('SConscript', variant_dir='Build')
""")
diff --git a/test/option/debug-findlibs.py b/test/option/debug-findlibs.py
index 9d5c82a..78ecee9 100644
--- a/test/option/debug-findlibs.py
+++ b/test/option/debug-findlibs.py
@@ -42,6 +42,7 @@ ofp.close()
""")
test.write('SConstruct', """\
+DefaultEnvironment(tools=[])
env = Environment(OBJSUFFIX = '.ooo', PROGSUFFIX = '.xxx',
LIBPATH = ['sub1', 'sub2', '.'],
LIBS = ['iii', 'jjj', 'kkk', 'lll', 'mmm'],
diff --git a/test/option/debug-includes.py b/test/option/debug-includes.py
index 0982a20..e5c8e0a 100644
--- a/test/option/debug-includes.py
+++ b/test/option/debug-includes.py
@@ -34,6 +34,7 @@ import TestSCons
test = TestSCons.TestSCons()
test.write('SConstruct', """
+DefaultEnvironment(tools=[])
env = Environment(OBJSUFFIX = '.obj',
SHOBJSUFFIX = '.shobj',
LIBPREFIX = '',
diff --git a/test/option/debug-memoizer.py b/test/option/debug-memoizer.py
index 222ba67..f65bcb8 100644
--- a/test/option/debug-memoizer.py
+++ b/test/option/debug-memoizer.py
@@ -36,9 +36,10 @@ test = TestSCons.TestSCons(match = TestSCons.match_re_dotall)
test.write('SConstruct', """
+DefaultEnvironment(tools=[])
def cat(target, source, env):
open(str(target[0]), 'wb').write(open(str(source[0]), 'rb').read())
-env = Environment(BUILDERS={'Cat':Builder(action=Action(cat))})
+env = Environment(tools=[], BUILDERS={'Cat':Builder(action=Action(cat))})
env.Cat('file.out', 'file.in')
""")
diff --git a/test/option/debug-memory.py b/test/option/debug-memory.py
index c9165ed..6d395d6 100644
--- a/test/option/debug-memory.py
+++ b/test/option/debug-memory.py
@@ -47,9 +47,10 @@ except ImportError:
test.write('SConstruct', """
+DefaultEnvironment(tools=[])
def cat(target, source, env):
open(str(target[0]), 'wb').write(open(str(source[0]), 'rb').read())
-env = Environment(BUILDERS={'Cat':Builder(action=Action(cat))})
+env = Environment(tools=[], BUILDERS={'Cat':Builder(action=Action(cat))})
env.Cat('file.out', 'file.in')
""")
diff --git a/test/option/debug-multiple.py b/test/option/debug-multiple.py
index f121a2c..23af13b 100644
--- a/test/option/debug-multiple.py
+++ b/test/option/debug-multiple.py
@@ -36,6 +36,7 @@ import TestSCons
test = TestSCons.TestSCons()
test.write('SConstruct', """
+DefaultEnvironment(tools=[])
def cat(target, source, env):
open(str(target[0]), 'wb').write(open(str(source[0]), 'rb').read())
env = Environment(BUILDERS={'Cat':Builder(action=Action(cat))})
diff --git a/test/option/debug-objects.py b/test/option/debug-objects.py
index 6a919a4..e86684a 100644
--- a/test/option/debug-objects.py
+++ b/test/option/debug-objects.py
@@ -41,9 +41,10 @@ except ImportError:
test.write('SConstruct', """
+DefaultEnvironment(tools=[])
def cat(target, source, env):
open(str(target[0]), 'wb').write(open(str(source[0]), 'rb').read())
-env = Environment(BUILDERS={'Cat':Builder(action=Action(cat))})
+env = Environment(tools=[], BUILDERS={'Cat':Builder(action=Action(cat))})
env.Cat('file.out', 'file.in')
""")
diff --git a/test/option/debug-pdb.py b/test/option/debug-pdb.py
index d4d285c..ec303a5 100644
--- a/test/option/debug-pdb.py
+++ b/test/option/debug-pdb.py
@@ -29,7 +29,8 @@ import TestSCons
test = TestSCons.TestSCons()
test.write('SConstruct', """\
-env = Environment()
+DefaultEnvironment(tools=[])
+env = Environment(tools=[])
""")
test.run(arguments = "--debug=pdb", stdin = "n\ns\nq\n")
diff --git a/test/option/debug-prepare.py b/test/option/debug-prepare.py
index 350c352..0ed95f9 100644
--- a/test/option/debug-prepare.py
+++ b/test/option/debug-prepare.py
@@ -31,7 +31,8 @@ _python_ = TestSCons._python_
test = TestSCons.TestSCons()
test.write('SConstruct', """\
-env=Environment()
+DefaultEnvironment(tools=[])
+env=Environment(tools=[])
dest=env.Command('foo.out', 'SConstruct',
[Copy('$TARGET', '$SOURCE'),
Copy('${TARGET}.extra', '$SOURCE')])
diff --git a/test/option/debug-presub.py b/test/option/debug-presub.py
index 28eeb83..0b0555a 100644
--- a/test/option/debug-presub.py
+++ b/test/option/debug-presub.py
@@ -37,6 +37,7 @@ sys.exit(0)
""")
test.write('SConstruct', """\
+DefaultEnvironment(tools=[])
def cat(env, source, target):
target = str(target[0])
f = open(target, "wb")
@@ -47,7 +48,8 @@ FILE = Builder(action="$FILECOM")
TEMP = Builder(action="$TEMPCOM")
LIST = Builder(action="$LISTCOM")
FUNC = Builder(action=cat)
-env = Environment(PYTHON=r'%(_python_)s',
+env = Environment(tools=[],
+ PYTHON=r'%(_python_)s',
BUILDERS = {'FILE':FILE, 'TEMP':TEMP, 'LIST':LIST, 'FUNC':FUNC},
FILECOM="$PYTHON cat.py $SOURCES $TARGET",
TEMPCOM="$PYTHON cat.py $SOURCES temp\\n$PYTHON cat.py temp $TARGET",
diff --git a/test/option/debug-stacktrace.py b/test/option/debug-stacktrace.py
index fcc4c1b..490fecf 100644
--- a/test/option/debug-stacktrace.py
+++ b/test/option/debug-stacktrace.py
@@ -33,6 +33,7 @@ import TestSCons
test = TestSCons.TestSCons()
test.write('SConstruct', """\
+DefaultEnvironment(tools=[])
def kfile_scan(node, env, target):
raise Exception("kfile_scan error")
@@ -40,7 +41,7 @@ kscan = Scanner(name = 'kfile',
function = kfile_scan,
skeys = ['.k'])
-env = Environment()
+env = Environment(tools=[])
env.Append(SCANNERS = [kscan])
env.Command('foo', 'foo.k', Copy('$TARGET', '$SOURCE'))
diff --git a/test/option/debug-time.py b/test/option/debug-time.py
index 7dd17fe..987e49f 100644
--- a/test/option/debug-time.py
+++ b/test/option/debug-time.py
@@ -44,7 +44,9 @@ sys.exit(0)
""")
test.write('SConstruct', """
-env = Environment(PYTHON = r'%(_python_)s',
+DefaultEnvironment(tools=[])
+env = Environment(tools=[],
+ PYTHON = r'%(_python_)s',
SLEEP_CAT = r'sleep_cat.py',
CATCOM = '$PYTHON $SLEEP_CAT $SECONDS $TARGET $SOURCES',
SECONDS = ARGUMENTS.get('SLEEP', '0'))
diff --git a/test/option/environment-overrides.py b/test/option/environment-overrides.py
index 8680e2c..fe2ac24 100644
--- a/test/option/environment-overrides.py
+++ b/test/option/environment-overrides.py
@@ -32,7 +32,7 @@ import TestSCons
test = TestSCons.TestSCons()
-test.write('SConstruct', "")
+test.write('SConstruct', "DefaultEnvironment(tools=[])\n")
test.run(arguments = '-e .',
stderr = "Warning: ignoring -e option\n")
diff --git a/test/option/help-options.py b/test/option/help-options.py
index e14eff2..1835a62 100644
--- a/test/option/help-options.py
+++ b/test/option/help-options.py
@@ -34,7 +34,7 @@ import TestSCons
test = TestSCons.TestSCons()
-test.write('SConstruct', "")
+test.write('SConstruct', "DefaultEnvironment(tools=[])\n")
test.run(arguments = '-H')
diff --git a/test/option/md5-chunksize.py b/test/option/md5-chunksize.py
index dbb2615..708143f 100644
--- a/test/option/md5-chunksize.py
+++ b/test/option/md5-chunksize.py
@@ -39,9 +39,10 @@ file.close()
""")
test.write('SConstruct', """
+DefaultEnvironment(tools=[])
SetOption('md5_chunksize', 128)
B = Builder(action = r'%(_python_)s build.py $TARGETS $SOURCES')
-env = Environment(BUILDERS = { 'B' : B })
+env = Environment(tools=[], BUILDERS = { 'B' : B })
f1 = env.B(target = 'f1.out', source = 'f1.in')
f2 = env.B(target = 'f2.out', source = 'f2.in')
Requires(f2, f1)
@@ -102,13 +103,14 @@ get_stat(["test.stat"], ["test.big"])
""")
test2.write('SConstruct', """
+DefaultEnvironment(tools=[])
import os
def get_stat(target, source, env):
stat = os.stat(source[0].get_abspath())
dest = open(target[0].get_abspath(),'w')
dest.write(str(stat))
dest.close()
-env = Environment()
+env = Environment(tools=[])
env.Command('test.big', 'SConstruct', 'dd if=/dev/zero of=test.big seek=100 bs=1M count=0 2>/dev/null')
env.AlwaysBuild('test.big')
env.Command('test.stat', 'test.big', Action(get_stat))
diff --git a/test/option/no-print-directory.py b/test/option/no-print-directory.py
index 850a484..2a5857e 100644
--- a/test/option/no-print-directory.py
+++ b/test/option/no-print-directory.py
@@ -32,7 +32,7 @@ import TestSCons
test = TestSCons.TestSCons()
-test.write('SConstruct', "")
+test.write('SConstruct', "DefaultEnvironment(tools=[])\n")
test.run(arguments = '--no-print-directory .',
stderr = "Warning: ignoring --no-print-directory option\n")
diff --git a/test/option/option_profile.py b/test/option/option_profile.py
index cb9d22c..4538e0e 100644
--- a/test/option/option_profile.py
+++ b/test/option/option_profile.py
@@ -48,6 +48,7 @@ except ImportError:
test.skip_test('No pstats module, skipping test.\n')
test.write('SConstruct', """\
+DefaultEnvironment(tools=[])
Command('file.out', 'file.in', Copy("$TARGET", "$SOURCE"))
""")
diff --git a/test/option/print-directory.py b/test/option/print-directory.py
index 96d9d7b..79d81d9 100644
--- a/test/option/print-directory.py
+++ b/test/option/print-directory.py
@@ -32,7 +32,7 @@ import TestSCons
test = TestSCons.TestSCons()
-test.write('SConstruct', "")
+test.write('SConstruct', "DefaultEnvironment(tools=[])\n")
test.run(arguments = '-w .',
stderr = "Warning: ignoring -w option\n")
diff --git a/test/option/repository.py b/test/option/repository.py
index a71e71e..392c421 100644
--- a/test/option/repository.py
+++ b/test/option/repository.py
@@ -37,7 +37,8 @@ test.subdir('repository', 'work1')
repository = test.workpath('repository')
test.write(['repository', 'SConstruct'], """\
-env = Environment()
+DefaultEnvironment(tools=[])
+env = Environment(tools=[])
env.Command('file.out', 'file.in', Copy('$TARGET', '$SOURCE'))
""")
diff --git a/test/option/srcdir.py b/test/option/srcdir.py
index 0a92f13..15c8f95 100644
--- a/test/option/srcdir.py
+++ b/test/option/srcdir.py
@@ -37,7 +37,8 @@ test.subdir('repository', 'work1')
repository = test.workpath('repository')
test.write(['repository', 'SConstruct'], r"""
-env = Environment()
+DefaultEnvironment(tools=[])
+env = Environment(tools=[])
env.Command('file.out', 'file.in', Copy('$TARGET', '$SOURCE'))
""")
diff --git a/test/option/stack-size.py b/test/option/stack-size.py
index 3d7a715..febec5a 100644
--- a/test/option/stack-size.py
+++ b/test/option/stack-size.py
@@ -49,8 +49,9 @@ file.close()
test.write(['work1', 'SConstruct'], """
+DefaultEnvironment(tools=[])
B = Builder(action = r'%(_python_)s ../build.py $TARGETS $SOURCES')
-env = Environment(BUILDERS = { 'B' : B })
+env = Environment(tools=[], BUILDERS = { 'B' : B })
f1 = env.B(target = 'f1.out', source = 'f1.in')
f2 = env.B(target = 'f2.out', source = 'f2.in')
Requires(f2, f1)
diff --git a/test/option/taskmastertrace.py b/test/option/taskmastertrace.py
index c426692..b38645f 100644
--- a/test/option/taskmastertrace.py
+++ b/test/option/taskmastertrace.py
@@ -33,7 +33,8 @@ import TestSCons
test = TestSCons.TestSCons()
test.write('SConstruct', """
-env = Environment()
+DefaultEnvironment(tools=[])
+env = Environment(tools=[])
# We name the files 'Tfile' so that they will sort after the SConstruct
# file regardless of whether the test is being run on a case-sensitive
diff --git a/test/option/tree-all.py b/test/option/tree-all.py
index fc0f689..6222ba1 100644
--- a/test/option/tree-all.py
+++ b/test/option/tree-all.py
@@ -39,6 +39,7 @@ LINK = test.detect('LINK')
if LINK is None: LINK = CC
test.write('SConstruct', """
+DefaultEnvironment(tools=[])
env = Environment(OBJSUFFIX = '.ooo', PROGSUFFIX = '.xxx')
env.Program('Foo', Split('Foo.c Bar.c'))
""")
diff --git a/test/option/tree-derived.py b/test/option/tree-derived.py
index 8490612..84d30fc 100644
--- a/test/option/tree-derived.py
+++ b/test/option/tree-derived.py
@@ -34,6 +34,7 @@ import TestSCons
test = TestSCons.TestSCons()
test.write('SConstruct', """
+DefaultEnvironment(tools=[])
env = Environment(OBJSUFFIX = '.ooo', PROGSUFFIX = '.xxx')
env.Program('foo', Split('foo.c bar.c'))
""")
diff --git a/test/option/tree-lib.py b/test/option/tree-lib.py
index 4725d42..1e6df02 100644
--- a/test/option/tree-lib.py
+++ b/test/option/tree-lib.py
@@ -38,6 +38,7 @@ import TestSCons
test = TestSCons.TestSCons()
test.write('SConstruct', """
+DefaultEnvironment(tools=[])
env = Environment(LIBPREFIX='',
LIBSUFFIX='.lib',
OBJSUFFIX='.obj',
diff --git a/test/option/warn-dependency.py b/test/option/warn-dependency.py
index ca0c2aa..dca3815 100644
--- a/test/option/warn-dependency.py
+++ b/test/option/warn-dependency.py
@@ -34,12 +34,13 @@ test = TestSCons.TestSCons(match = TestSCons.match_re_dotall)
test.write("SConstruct", """\
+DefaultEnvironment(tools=[])
import SCons.Defaults
def build(target, source, env):
pass
-env=Environment()
+env=Environment(tools=[])
env['BUILDERS']['test'] = Builder(action=build,
source_scanner=SCons.Defaults.ObjSourceScan)
env.test(target='foo', source='foo.c')
diff --git a/test/option/warn-duplicate-environment.py b/test/option/warn-duplicate-environment.py
index 09ced2d..1509e41 100644
--- a/test/option/warn-duplicate-environment.py
+++ b/test/option/warn-duplicate-environment.py
@@ -34,6 +34,7 @@ test = TestSCons.TestSCons(match = TestSCons.match_re_dotall)
test.write('SConstruct', """
+DefaultEnvironment(tools=[])
def build(env, target, source):
file = open(str(target[0]), 'wb')
for s in source:
@@ -44,7 +45,7 @@ if WARN:
SetOption('warn', WARN)
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 = 'file1.out', source = 'file1a.in')
env2.B(target = 'file1.out', source = 'file1b.in')
diff --git a/test/option/warn-misleading-keywords.py b/test/option/warn-misleading-keywords.py
index 67bc965..ca934e5 100644
--- a/test/option/warn-misleading-keywords.py
+++ b/test/option/warn-misleading-keywords.py
@@ -34,6 +34,7 @@ test = TestSCons.TestSCons(match = TestSCons.match_re_dotall)
test.write('SConstruct', """
+DefaultEnvironment(tools=[])
def build(env, target, source):
file = open(str(target[0]), 'wb')
for s in source:
@@ -44,7 +45,7 @@ if WARN:
SetOption('warn', WARN)
B = Builder(action=build, multi=1)
-env = Environment(BUILDERS = { 'B' : B })
+env = Environment(tools=[], BUILDERS = { 'B' : B })
env.B(targets = 'file3a.out', source = 'file3a.in')
env.B(target = 'file3b.out', sources = 'file3b.in')
""")
diff --git a/test/option/warn-missing-sconscript.py b/test/option/warn-missing-sconscript.py
index 492131b..f5e697b 100644
--- a/test/option/warn-missing-sconscript.py
+++ b/test/option/warn-missing-sconscript.py
@@ -34,10 +34,11 @@ test = TestSCons.TestSCons(match = TestSCons.match_re_dotall)
test.write("SConstruct", """\
+DefaultEnvironment(tools=[])
def build(target, source, env):
pass
-env=Environment()
+env=Environment(tools=[])
env['BUILDERS']['test'] = Builder(action=build)
env.test(target='foo', source='foo.c')
WARN = ARGUMENTS.get('WARN')