summaryrefslogtreecommitdiffstats
path: root/test/AS
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2010-03-25 04:14:28 (GMT)
committerGreg Noel <GregNoel@tigris.org>2010-03-25 04:14:28 (GMT)
commit22d352500f1cd6bd0c53d788a5dc44a1fefa676e (patch)
tree0984fd581082c27cfbfbb7f94d5751b0e6fd2741 /test/AS
parent75ac32ac8e32076e25b72a19eb56340cc585fa4e (diff)
downloadSCons-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/AS')
-rw-r--r--test/AS/AS.py3
-rw-r--r--test/AS/ASCOM.py2
-rw-r--r--test/AS/ASCOMSTR.py2
-rw-r--r--test/AS/ASFLAGS.py3
-rw-r--r--test/AS/ASPP.py3
-rw-r--r--test/AS/ASPPCOM.py2
-rw-r--r--test/AS/ASPPCOMSTR.py4
-rw-r--r--test/AS/ASPPFLAGS.py3
-rw-r--r--test/AS/as-live.py8
-rw-r--r--test/AS/ml.py6
-rw-r--r--test/AS/nasm.py12
11 files changed, 18 insertions, 30 deletions
diff --git a/test/AS/AS.py b/test/AS/AS.py
index 0857a62..38ea655 100644
--- a/test/AS/AS.py
+++ b/test/AS/AS.py
@@ -43,7 +43,6 @@ test = TestSCons.TestSCons()
if sys.platform == 'win32':
test.write('mylink.py', r"""
-import string
import sys
args = sys.argv[1:]
while args:
@@ -51,7 +50,7 @@ while args:
if a[0] != '/':
break
args = args[1:]
- if string.lower(a[:5]) == '/out:': out = a[5:]
+ if a[:5].lower() == '/out:': out = a[5:]
infile = open(args[0], 'rb')
outfile = open(out, 'wb')
for l in infile.readlines():
diff --git a/test/AS/ASCOM.py b/test/AS/ASCOM.py
index 1be592c..a874f32 100644
--- a/test/AS/ASCOM.py
+++ b/test/AS/ASCOM.py
@@ -42,7 +42,7 @@ test.write('myas.py', r"""
import sys
infile = open(sys.argv[2], 'rb')
outfile = open(sys.argv[1], 'wb')
-for l in filter(lambda l: l != "#as\n", infile.readlines()):
+for l in [l for l in infile.readlines() if l != "#as\n"]:
outfile.write(l)
sys.exit(0)
""")
diff --git a/test/AS/ASCOMSTR.py b/test/AS/ASCOMSTR.py
index eaa344a..f7cc34e 100644
--- a/test/AS/ASCOMSTR.py
+++ b/test/AS/ASCOMSTR.py
@@ -43,7 +43,7 @@ test.write('myas.py', r"""
import sys
infile = open(sys.argv[2], 'rb')
outfile = open(sys.argv[1], 'wb')
-for l in filter(lambda l: l != "#as\n", infile.readlines()):
+for l in [l for l in infile.readlines() if l != "#as\n"]:
outfile.write(l)
sys.exit(0)
""")
diff --git a/test/AS/ASFLAGS.py b/test/AS/ASFLAGS.py
index 5581b07..4f89c2c 100644
--- a/test/AS/ASFLAGS.py
+++ b/test/AS/ASFLAGS.py
@@ -41,7 +41,6 @@ if sys.platform == 'win32':
o_c = ' -x'
test.write('mylink.py', r"""
-import string
import sys
args = sys.argv[1:]
while args:
@@ -49,7 +48,7 @@ while args:
if a[0] != '/':
break
args = args[1:]
- if string.lower(a[:5]) == '/out:': out = a[5:]
+ if a[:5].lower() == '/out:': out = a[5:]
infile = open(args[0], 'rb')
outfile = open(out, 'wb')
for l in infile.readlines():
diff --git a/test/AS/ASPP.py b/test/AS/ASPP.py
index d8fb3be..f8bea47 100644
--- a/test/AS/ASPP.py
+++ b/test/AS/ASPP.py
@@ -38,7 +38,6 @@ test = TestSCons.TestSCons()
if sys.platform == 'win32':
test.write('mylink.py', r"""
-import string
import sys
args = sys.argv[1:]
while args:
@@ -46,7 +45,7 @@ while args:
if a[0] != '/':
break
args = args[1:]
- if string.lower(a[:5]) == '/out:': out = a[5:]
+ if a[:5].lower() == '/out:': out = a[5:]
infile = open(args[0], 'rb')
outfile = open(out, 'wb')
for l in infile.readlines():
diff --git a/test/AS/ASPPCOM.py b/test/AS/ASPPCOM.py
index 53f4add..73b3ec3 100644
--- a/test/AS/ASPPCOM.py
+++ b/test/AS/ASPPCOM.py
@@ -40,7 +40,7 @@ test.write('myas.py', r"""
import sys
infile = open(sys.argv[2], 'rb')
outfile = open(sys.argv[1], 'wb')
-for l in filter(lambda l: l != "#as\n", infile.readlines()):
+for l in [l for l in infile.readlines() if l != "#as\n"]:
outfile.write(l)
sys.exit(0)
""")
diff --git a/test/AS/ASPPCOMSTR.py b/test/AS/ASPPCOMSTR.py
index 20e3de0..7de3b12 100644
--- a/test/AS/ASPPCOMSTR.py
+++ b/test/AS/ASPPCOMSTR.py
@@ -29,8 +29,6 @@ Test that the $ASPPCOMSTR construction variable allows you to customize
the displayed assembler string.
"""
-import string
-
import TestSCons
_python_ = TestSCons._python_
@@ -43,7 +41,7 @@ test.write('myas.py', r"""
import sys
infile = open(sys.argv[2], 'rb')
outfile = open(sys.argv[1], 'wb')
-for l in filter(lambda l: l != "#as\n", infile.readlines()):
+for l in [l for l in infile.readlines() if l != "#as\n"]:
outfile.write(l)
sys.exit(0)
""")
diff --git a/test/AS/ASPPFLAGS.py b/test/AS/ASPPFLAGS.py
index e306c22..f27d0ad 100644
--- a/test/AS/ASPPFLAGS.py
+++ b/test/AS/ASPPFLAGS.py
@@ -41,7 +41,6 @@ if sys.platform == 'win32':
o_c = ' -x'
test.write('mylink.py', r"""
-import string
import sys
args = sys.argv[1:]
while args:
@@ -49,7 +48,7 @@ while args:
if a[0] != '/':
break
args = args[1:]
- if string.lower(a[:5]) == '/out:': out = a[5:]
+ if a[:5].lower() == '/out:': out = a[5:]
infile = open(args[0], 'rb')
outfile = open(out, 'wb')
for l in infile.readlines():
diff --git a/test/AS/as-live.py b/test/AS/as-live.py
index 0ee7c16..0f7ec38 100644
--- a/test/AS/as-live.py
+++ b/test/AS/as-live.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Verify correct use of the live 'as' assembler.
"""
-import string
import sys
import TestSCons
@@ -43,7 +42,7 @@ test = TestSCons.TestSCons()
if not test.detect('AS', 'as'):
test.skip_test("as not found; skipping test\n")
-x86 = (sys.platform == 'win32' or string.find(sys.platform, 'linux') != -1)
+x86 = (sys.platform == 'win32' or sys.platform.find('linux') != -1)
if not x86:
test.skip_test("skipping as test on non-x86 platform '%s'\n" % sys.platform)
@@ -52,12 +51,11 @@ if not x86:
test.write("wrapper.py", """\
import os
-import string
import sys
open('%s', 'wb').write("wrapper.py: %%s\\n" %% sys.argv[-1])
-cmd = string.join(sys.argv[1:])
+cmd = " ".join(sys.argv[1:])
os.system(cmd)
-""" % string.replace(test.workpath('wrapper.out'), '\\', '\\\\'))
+""" % test.workpath('wrapper.out').replace('\\', '\\\\'))
test.write('SConstruct', """\
aaa = Environment()
diff --git a/test/AS/ml.py b/test/AS/ml.py
index a731efb..9491e36 100644
--- a/test/AS/ml.py
+++ b/test/AS/ml.py
@@ -28,7 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Verify correct use of the live 'ml' assembler.
"""
-import string
import sys
import TestSCons
@@ -48,11 +47,10 @@ if not ml:
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', """
import os
diff --git a/test/AS/nasm.py b/test/AS/nasm.py
index b6d61a3..be7db3e 100644
--- a/test/AS/nasm.py
+++ b/test/AS/nasm.py
@@ -29,7 +29,6 @@ Verify correct use of the live 'nasm' assembler.
"""
import os
-import string
import sys
import TestSCons
@@ -44,7 +43,7 @@ nasm = test.where_is('nasm')
if not nasm:
test.skip_test('nasm not found; skipping test\n')
-if string.find(sys.platform, 'linux') == -1:
+if sys.platform.find('linux') == -1:
test.skip_test("skipping test on non-Linux platform '%s'\n" % sys.platform)
try:
@@ -53,7 +52,7 @@ try:
except OSError:
test.skip_test('could not determine nasm version; skipping test\n')
else:
- version = string.split(stdout.read())[2]
+ version = stdout.read().split()[2]
if version[:4] != '0.98':
test.skip_test("skipping test of nasm version %s\n" % version)
@@ -71,17 +70,16 @@ else:
nasm_format = 'elf'
format_map = {}
for k, v in format_map.items():
- if string.find(sys.platform, k) != -1:
+ if sys.platform.find(k) != -1:
nasm_format = v
break
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', """
eee = Environment(tools = ['gcc', 'gnulink', 'nasm'],