summaryrefslogtreecommitdiffstats
path: root/test/Libs
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/Libs
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/Libs')
-rw-r--r--test/Libs/SharedLibrary.py11
-rw-r--r--test/Libs/SharedLibraryIxes.py12
2 files changed, 11 insertions, 12 deletions
diff --git a/test/Libs/SharedLibrary.py b/test/Libs/SharedLibrary.py
index 1bb91ea..18d1f24 100644
--- a/test/Libs/SharedLibrary.py
+++ b/test/Libs/SharedLibrary.py
@@ -25,7 +25,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
-import string
import sys
import TestSCons
@@ -202,13 +201,13 @@ test.run(arguments = '.',
if os.name == 'posix':
os.environ['LD_LIBRARY_PATH'] = '.'
-if string.find(sys.platform, 'irix') != -1:
+if sys.platform.find('irix') != -1:
os.environ['LD_LIBRARYN32_PATH'] = '.'
test.run(program = test.workpath('prog'),
stdout = "f1.c\nf2a.c\nf2b.c\nf2c.c\nf3a.c\nf3b.c\nf3c.c\nprog.c\n")
-if sys.platform == 'win32' or string.find(sys.platform, 'irix') != -1:
+if sys.platform == 'win32' or sys.platform.find('irix') != -1:
test.run(arguments = '-f SConstructFoo')
else:
test.run(arguments = '-f SConstructFoo', status=2, stderr='''\
@@ -274,9 +273,9 @@ main(int argc, char *argv[])
# Make sure there is (at most) one mention each of the
# appropriate .def and .lib files per line.
- for line in string.split(test.stdout(), '\n'):
- test.fail_test(string.count(line, 'foo4.def') > 1)
- test.fail_test(string.count(line, 'foo4.lib') > 1)
+ for line in test.stdout().split('\n'):
+ test.fail_test(line.count('foo4.def') > 1)
+ test.fail_test(line.count('foo4.lib') > 1)
test.run(program = test.workpath('progbar'),
stdout = "f4.c\nprogbar.c\n")
diff --git a/test/Libs/SharedLibraryIxes.py b/test/Libs/SharedLibraryIxes.py
index fb0bc22..c60165a 100644
--- a/test/Libs/SharedLibraryIxes.py
+++ b/test/Libs/SharedLibraryIxes.py
@@ -46,7 +46,7 @@ env.Append(LIBPATH=['.'])
# We first bake the LIBSUFFIXES, so that it will not change as a
# side-effect of changing SHLIBSUFFIX.
-env['LIBSUFFIXES'] = map( env.subst, env.get('LIBSUFFIXES', []))
+env['LIBSUFFIXES'] = list(map( env.subst, env.get('LIBSUFFIXES', [])))
weird_prefixes = ['libXX', 'libYY']
@@ -76,13 +76,13 @@ def nodeInSrc(source, lib, libname):
return (source+lib, '')
def pathInSrc(source, lib, libname):
- return (source+map(str,lib), '')
+ return (source+list(map(str,lib)), '')
def nodeInLib(source, lib, libname):
return (source, lib)
def pathInLib(source, lib, libname):
- return (source, map(str,lib))
+ return (source, list(map(str,lib)))
def nameInLib(source, lib, libname):
# NOTE: libname must contain both the proper prefix and suffix.
@@ -116,7 +116,7 @@ def buildAndlinkAgainst(builder, target, source, method, lib, libname, **kw):
kw['target'] = target
kw['source'] = source
kw['LIBS'] = LIBS
- build = apply(builder, (), kw)
+ build = builder(**kw)
# Check that the build target depends on at least one of the
# library target.
@@ -128,7 +128,7 @@ def buildAndlinkAgainst(builder, target, source, method, lib, libname, **kw):
break;
assert found_dep, \
"One of %s not found in %s, method=%s, libname=%s, shlibsuffix=%s" % \
- (map(str,lib), map(str, build[0].children()), method.__name__, libname, shlibsuffix)
+ (list(map(str,lib)), list(map(str, build[0].children())), method.__name__, libname, shlibsuffix)
return build
def prog(i,
@@ -194,7 +194,7 @@ except AttributeError:
pass
for i in range(200):
- apply(prog, tests[i])
+ prog(*tests[i])
""")