From c1d1e5492069b799a5e7a9689bf940d34b9a526a Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Fri, 20 Dec 2019 13:19:43 -0700 Subject: [PR #3506] fix remnamt docstring and speed up left a pasted traceback in the SourceCode.py test, got rid of. applied "standard" speedup of dropping tools in DefaultEnvironmment and Environment, speeds up windows a lot (individual Removed tests running in 1 sec instead of 15) Signed-off-by: Mats Wichmann --- test/Removed/BuildDir/BuildDir.py | 2 +- test/Removed/BuildDir/SConscript-build_dir.py | 2 +- test/Removed/BuildDir/SConstruct.global | 1 + test/Removed/BuildDir/SConstruct.kwarg | 1 + test/Removed/BuildDir/SConstruct.method | 4 ++-- test/Removed/Copy-Method/Copy-Method.py | 2 +- test/Removed/Copy-Method/SConstruct.method | 3 ++- test/Removed/SourceCode/SourceCode.py | 13 ------------- test/Removed/SourceSignatures/SConstruct.method | 1 + test/Removed/SourceSignatures/SConstruct.setopt | 1 + test/Removed/SourceSignatures/SourceSignatures.py | 2 +- test/Removed/TargetSignatures/SConstruct.method | 1 + test/Removed/TargetSignatures/SConstruct.setopt | 1 + test/Removed/TargetSignatures/TargetSignatures.py | 2 +- 14 files changed, 15 insertions(+), 21 deletions(-) diff --git a/test/Removed/BuildDir/BuildDir.py b/test/Removed/BuildDir/BuildDir.py index 43c8b8b..589b89a 100644 --- a/test/Removed/BuildDir/BuildDir.py +++ b/test/Removed/BuildDir/BuildDir.py @@ -38,7 +38,7 @@ test.subdir('src') test.file_fixture('SConstruct.global', 'SConstruct') expect = """\ NameError: name 'BuildDir' is not defined: - File "{}", line 1: + File "{}", line 2: BuildDir('build', 'src') """.format(test.workpath('SConstruct')) test.run(arguments='-Q -s', status=2, stderr=expect) diff --git a/test/Removed/BuildDir/SConscript-build_dir.py b/test/Removed/BuildDir/SConscript-build_dir.py index 5a8d1ca..77b6ee4 100644 --- a/test/Removed/BuildDir/SConscript-build_dir.py +++ b/test/Removed/BuildDir/SConscript-build_dir.py @@ -43,7 +43,7 @@ test.write(['src', 'SConscript'], """ # this doesn't work yet expect = """\ TypeError: SConscript() got an unexpected keyword argument 'build_dir': - File "{}", line 1: + File "{}", line 2: SConscript('src/SConscript', build_dir='build') """.format(test.workpath('SConstruct')) test.run(arguments='-Q -s', status=2, stderr=expect) diff --git a/test/Removed/BuildDir/SConstruct.global b/test/Removed/BuildDir/SConstruct.global index 086fbae..7dddf29 100644 --- a/test/Removed/BuildDir/SConstruct.global +++ b/test/Removed/BuildDir/SConstruct.global @@ -1 +1,2 @@ +DefaultEnvironment(tools=[]) BuildDir('build', 'src') diff --git a/test/Removed/BuildDir/SConstruct.kwarg b/test/Removed/BuildDir/SConstruct.kwarg index a5c46fb..2288669 100644 --- a/test/Removed/BuildDir/SConstruct.kwarg +++ b/test/Removed/BuildDir/SConstruct.kwarg @@ -1 +1,2 @@ +DefaultEnvironment(tools=[]) SConscript('src/SConscript', build_dir='build') diff --git a/test/Removed/BuildDir/SConstruct.method b/test/Removed/BuildDir/SConstruct.method index afea459..ddf2324 100644 --- a/test/Removed/BuildDir/SConstruct.method +++ b/test/Removed/BuildDir/SConstruct.method @@ -1,3 +1,3 @@ -env = Environment(BUILD='build', SRC='src') - +DefaultEnvironment(tools=[]) +env = Environment(BUILD='build', SRC='src', tools=[]) env.BuildDir('build', 'src') diff --git a/test/Removed/Copy-Method/Copy-Method.py b/test/Removed/Copy-Method/Copy-Method.py index bca10fe..4c7c386 100644 --- a/test/Removed/Copy-Method/Copy-Method.py +++ b/test/Removed/Copy-Method/Copy-Method.py @@ -35,7 +35,7 @@ test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) test.file_fixture('SConstruct.method', 'SConstruct') expect = """\ AttributeError: 'SConsEnvironment' object has no attribute 'Copy': - File "{}", line 2: + File "{}", line 3: env.Copy() """.format(test.workpath('SConstruct')) test.run(arguments='-Q -s', status=2, stderr=expect, match=TestSCons.match_exact) diff --git a/test/Removed/Copy-Method/SConstruct.method b/test/Removed/Copy-Method/SConstruct.method index 99737e1..5a59bd6 100644 --- a/test/Removed/Copy-Method/SConstruct.method +++ b/test/Removed/Copy-Method/SConstruct.method @@ -1,2 +1,3 @@ -env = Environment() +DefaultEnvironment(tools=[]) +env = Environment(tools=["textfile"]) env.Copy() diff --git a/test/Removed/SourceCode/SourceCode.py b/test/Removed/SourceCode/SourceCode.py index 8ac54d4..f586ef6 100644 --- a/test/Removed/SourceCode/SourceCode.py +++ b/test/Removed/SourceCode/SourceCode.py @@ -1,16 +1,3 @@ -""" -NameError: name 'SourceCode' is not defined: - File "/tmp/testcmd.193317.nqan7rtg/SConstruct", line 4: - SConscript('SConscript') - File "/home/mats/github/scons/src/engine/SCons/Script/SConscript.py", line 660: - return method(*args, **kw) - File "/home/mats/github/scons/src/engine/SCons/Script/SConscript.py", line 597: - return _SConscript(self.fs, *files, **subst_kw) - File "/home/mats/github/scons/src/engine/SCons/Script/SConscript.py", line 286: - exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals) - File "/tmp/testcmd.193317.nqan7rtg/SConscript", line 2: - SourceCode('.', None) -""" #!/usr/bin/env python # # __COPYRIGHT__ diff --git a/test/Removed/SourceSignatures/SConstruct.method b/test/Removed/SourceSignatures/SConstruct.method index e68d6bf..99ef2d2 100644 --- a/test/Removed/SourceSignatures/SConstruct.method +++ b/test/Removed/SourceSignatures/SConstruct.method @@ -1 +1,2 @@ +DefaultEnvironment(tools=[]) SourceSignatures('MD5') diff --git a/test/Removed/SourceSignatures/SConstruct.setopt b/test/Removed/SourceSignatures/SConstruct.setopt index 6e1161f..f4b278e 100644 --- a/test/Removed/SourceSignatures/SConstruct.setopt +++ b/test/Removed/SourceSignatures/SConstruct.setopt @@ -1 +1,2 @@ +DefaultEnvironment(tools=[]) SetOption('warn', 'deprecated-source-signatures') diff --git a/test/Removed/SourceSignatures/SourceSignatures.py b/test/Removed/SourceSignatures/SourceSignatures.py index 014c163..04d2ed7 100644 --- a/test/Removed/SourceSignatures/SourceSignatures.py +++ b/test/Removed/SourceSignatures/SourceSignatures.py @@ -36,7 +36,7 @@ test = TestSCons.TestSCons() test.file_fixture('SConstruct.method', 'SConstruct') expect = """\ NameError: name 'SourceSignatures' is not defined: - File "{}", line 1: + File "{}", line 2: SourceSignatures('MD5') """.format(test.workpath('SConstruct')) test.run(arguments='-Q -s', status=2, stdout=None, stderr=expect) diff --git a/test/Removed/TargetSignatures/SConstruct.method b/test/Removed/TargetSignatures/SConstruct.method index 5e974b6..9f82f9b 100644 --- a/test/Removed/TargetSignatures/SConstruct.method +++ b/test/Removed/TargetSignatures/SConstruct.method @@ -1 +1,2 @@ +DefaultEnvironment(tools=[]) TargetSignatures('MD5') diff --git a/test/Removed/TargetSignatures/SConstruct.setopt b/test/Removed/TargetSignatures/SConstruct.setopt index c887ce4..5576ba8 100644 --- a/test/Removed/TargetSignatures/SConstruct.setopt +++ b/test/Removed/TargetSignatures/SConstruct.setopt @@ -1 +1,2 @@ +DefaultEnvironment(tools=[]) SetOption('warn', 'deprecated-target-signatures') diff --git a/test/Removed/TargetSignatures/TargetSignatures.py b/test/Removed/TargetSignatures/TargetSignatures.py index 889f992..edd60a2 100644 --- a/test/Removed/TargetSignatures/TargetSignatures.py +++ b/test/Removed/TargetSignatures/TargetSignatures.py @@ -36,7 +36,7 @@ test = TestSCons.TestSCons() test.file_fixture('SConstruct.method', 'SConstruct') expect = """\ NameError: name 'TargetSignatures' is not defined: - File "{}", line 1: + File "{}", line 2: TargetSignatures('MD5') """.format(test.workpath('SConstruct')) test.run(arguments='-Q -s', status=2, stdout=None, stderr=expect) -- cgit v0.12