diff options
author | Greg Noel <GregNoel@tigris.org> | 2010-03-25 04:14:28 (GMT) |
---|---|---|
committer | Greg Noel <GregNoel@tigris.org> | 2010-03-25 04:14:28 (GMT) |
commit | 22d352500f1cd6bd0c53d788a5dc44a1fefa676e (patch) | |
tree | 0984fd581082c27cfbfbb7f94d5751b0e6fd2741 /test/LINK | |
parent | 75ac32ac8e32076e25b72a19eb56340cc585fa4e (diff) | |
download | SCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.zip SCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.tar.gz SCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.tar.bz2 |
Move 2.0 changes collected in branches/pending back to trunk for further
development. Note that this set of changes is NOT backward-compatible;
the trunk no longer works with Python 1.5.2, 2.0, or 2.1.
Diffstat (limited to 'test/LINK')
-rw-r--r-- | test/LINK/LINK.py | 6 | ||||
-rw-r--r-- | test/LINK/LINKCOM.py | 2 | ||||
-rw-r--r-- | test/LINK/LINKCOMSTR.py | 4 | ||||
-rw-r--r-- | test/LINK/LINKFLAGS.py | 8 | ||||
-rw-r--r-- | test/LINK/SHLINK.py | 6 | ||||
-rw-r--r-- | test/LINK/SHLINKCOM.py | 4 | ||||
-rw-r--r-- | test/LINK/SHLINKCOMSTR.py | 4 | ||||
-rw-r--r-- | test/LINK/SHLINKFLAGS.py | 8 |
8 files changed, 16 insertions, 26 deletions
diff --git a/test/LINK/LINK.py b/test/LINK/LINK.py index 21e2d66..25d9efb 100644 --- a/test/LINK/LINK.py +++ b/test/LINK/LINK.py @@ -25,7 +25,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os -import string import TestSCons @@ -36,11 +35,10 @@ test = TestSCons.TestSCons() test.write("wrapper.py", """import os -import string import sys open('%s', 'wb').write("wrapper.py\\n") -os.system(string.join(sys.argv[1:], " ")) -""" % string.replace(test.workpath('wrapper.out'), '\\', '\\\\')) +os.system(" ".join(sys.argv[1:])) +""" % test.workpath('wrapper.out').replace('\\', '\\\\')) test.write('SConstruct', """ foo = Environment() diff --git a/test/LINK/LINKCOM.py b/test/LINK/LINKCOM.py index b3c56d6..f09e8f8 100644 --- a/test/LINK/LINKCOM.py +++ b/test/LINK/LINKCOM.py @@ -42,7 +42,7 @@ import sys outfile = open(sys.argv[1], 'wb') for f in sys.argv[2:]: infile = open(f, 'rb') - for l in filter(lambda l: l != '/*link*/\n', infile.readlines()): + for l in [l for l in infile.readlines() if l != '/*link*/\n']: outfile.write(l) sys.exit(0) """) diff --git a/test/LINK/LINKCOMSTR.py b/test/LINK/LINKCOMSTR.py index 7e12c1d..113bdcd 100644 --- a/test/LINK/LINKCOMSTR.py +++ b/test/LINK/LINKCOMSTR.py @@ -29,8 +29,6 @@ Test that the $LINKCOMSTR construction variable allows you to customize the displayed linker string. """ -import string - import TestSCons _python_ = TestSCons._python_ @@ -45,7 +43,7 @@ import sys outfile = open(sys.argv[1], 'wb') for f in sys.argv[2:]: infile = open(f, 'rb') - for l in filter(lambda l: l != '/*link*/\n', infile.readlines()): + for l in [l for l in infile.readlines() if l != '/*link*/\n']: outfile.write(l) sys.exit(0) """) diff --git a/test/LINK/LINKFLAGS.py b/test/LINK/LINKFLAGS.py index 1726709..442baf7 100644 --- a/test/LINK/LINKFLAGS.py +++ b/test/LINK/LINKFLAGS.py @@ -25,7 +25,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os -import string import TestSCons @@ -36,12 +35,11 @@ test = TestSCons.TestSCons() test.write("wrapper.py", """import os -import string import sys open('%s', 'wb').write("wrapper.py\\n") -args = filter(lambda s: s != 'fake_link_flag', sys.argv[1:]) -os.system(string.join(args, " ")) -""" % string.replace(test.workpath('wrapper.out'), '\\', '\\\\')) +args = [s for s in sys.argv[1:] if s != 'fake_link_flag'] +os.system(" ".join(args)) +""" % test.workpath('wrapper.out').replace('\\', '\\\\')) test.write('SConstruct', """ foo = Environment() diff --git a/test/LINK/SHLINK.py b/test/LINK/SHLINK.py index 2bd9bd6..bc1239b 100644 --- a/test/LINK/SHLINK.py +++ b/test/LINK/SHLINK.py @@ -25,7 +25,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os -import string import TestSCons @@ -37,11 +36,10 @@ test = TestSCons.TestSCons() test.write("wrapper.py", """import os -import string import sys open('%s', 'wb').write("wrapper.py\\n") -os.system(string.join(sys.argv[1:], " ")) -""" % string.replace(test.workpath('wrapper.out'), '\\', '\\\\')) +os.system(" ".join(sys.argv[1:])) +""" % test.workpath('wrapper.out').replace('\\', '\\\\')) test.write('SConstruct', """ foo = Environment() diff --git a/test/LINK/SHLINKCOM.py b/test/LINK/SHLINKCOM.py index c507d31..8bdb9b5 100644 --- a/test/LINK/SHLINKCOM.py +++ b/test/LINK/SHLINKCOM.py @@ -41,7 +41,7 @@ import sys outfile = open(sys.argv[1], 'wb') for f in sys.argv[2:]: infile = open(f, 'rb') - for l in filter(lambda l: l != '/*cc*/\n', infile.readlines()): + for l in [l for l in infile.readlines() if l != '/*cc*/\n']: outfile.write(l) sys.exit(0) @@ -51,7 +51,7 @@ import sys outfile = open(sys.argv[1], 'wb') for f in sys.argv[2:]: infile = open(f, 'rb') - for l in filter(lambda l: l != '/*link*/\n', infile.readlines()): + for l in [l for l in infile.readlines() if l != '/*link*/\n']: outfile.write(l) sys.exit(0) """) diff --git a/test/LINK/SHLINKCOMSTR.py b/test/LINK/SHLINKCOMSTR.py index 1d93b75..dd6f22b 100644 --- a/test/LINK/SHLINKCOMSTR.py +++ b/test/LINK/SHLINKCOMSTR.py @@ -42,7 +42,7 @@ import sys outfile = open(sys.argv[1], 'wb') for f in sys.argv[2:]: infile = open(f, 'rb') - for l in filter(lambda l: l != '/*cc*/\n', infile.readlines()): + for l in [l for l in infile.readlines() if l != '/*cc*/\n']: outfile.write(l) sys.exit(0) @@ -52,7 +52,7 @@ import sys outfile = open(sys.argv[1], 'wb') for f in sys.argv[2:]: infile = open(f, 'rb') - for l in filter(lambda l: l != '/*link*/\n', infile.readlines()): + for l in [l for l in infile.readlines() if l != '/*link*/\n']: outfile.write(l) sys.exit(0) """) diff --git a/test/LINK/SHLINKFLAGS.py b/test/LINK/SHLINKFLAGS.py index ddd1a6c..57766de 100644 --- a/test/LINK/SHLINKFLAGS.py +++ b/test/LINK/SHLINKFLAGS.py @@ -25,7 +25,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os -import string import TestSCons @@ -37,12 +36,11 @@ test = TestSCons.TestSCons() test.write("wrapper.py", """import os -import string import sys open('%s', 'wb').write("wrapper.py\\n") -args = filter(lambda s: s != 'fake_shlink_flag', sys.argv[1:]) -os.system(string.join(args, " ")) -""" % string.replace(test.workpath('wrapper.out'), '\\', '\\\\')) +args = [s for s in sys.argv[1:] if s != 'fake_shlink_flag'] +os.system(" ".join(args)) +""" % test.workpath('wrapper.out').replace('\\', '\\\\')) test.write('SConstruct', """ foo = Environment() |