summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-03-16 04:38:43 (GMT)
committerSteven Knight <knight@baldmt.com>2002-03-16 04:38:43 (GMT)
commit0bfa6712f6b0ba40f7df806ec35a40fa056f026f (patch)
tree821e70780eb384562d222a2e8cbfe8f4e78a430d /test
parentd274d685b3fae62354a7c3deb0622e2edd81b0c7 (diff)
downloadSCons-0bfa6712f6b0ba40f7df806ec35a40fa056f026f.zip
SCons-0bfa6712f6b0ba40f7df806ec35a40fa056f026f.tar.gz
SCons-0bfa6712f6b0ba40f7df806ec35a40fa056f026f.tar.bz2
Make FunctionAction arguments be Nodes, not strings. (Charles Crain)
Diffstat (limited to 'test')
-rw-r--r--test/BuildDir.py4
-rw-r--r--test/Command.py4
-rw-r--r--test/actions.py6
-rw-r--r--test/sconsign.py4
4 files changed, 10 insertions, 8 deletions
diff --git a/test/BuildDir.py b/test/BuildDir.py
index 63b357e..a71d4dd 100644
--- a/test/BuildDir.py
+++ b/test/BuildDir.py
@@ -68,8 +68,8 @@ import os.path
def buildIt(target, source, env):
if not os.path.exists('build'):
os.mkdir('build')
- f1=open(source[0], 'r')
- f2=open(target, 'w')
+ f1=open(str(source[0]), 'r')
+ f2=open(str(target[0]), 'w')
f2.write(f1.read())
f2.close()
f1.close()
diff --git a/test/Command.py b/test/Command.py
index ddf78ce..1f4a490 100644
--- a/test/Command.py
+++ b/test/Command.py
@@ -41,8 +41,8 @@ file.close()
test.write('SConstruct', """
def buildIt(env, target, source):
- contents = open(source[0], 'rb').read()
- file = open(target, 'wb')
+ contents = open(str(source[0]), 'rb').read()
+ file = open(str(target[0]), 'wb')
file.write(contents)
file.close()
return 0
diff --git a/test/actions.py b/test/actions.py
index c6198dd..65fa01a 100644
--- a/test/actions.py
+++ b/test/actions.py
@@ -70,7 +70,8 @@ test.write('SConstruct', """
import os
import string
def func(env, target, source):
- cmd = r'%s build.py %%s 3 %%s' %% (target, string.join(source, ' '))
+ cmd = r'%s build.py %%s 3 %%s' %% (string.join(map(str, target)),
+ string.join(map(str, source)))
print cmd
return os.system(cmd)
B = Builder(name = 'B', action = func)
@@ -96,7 +97,8 @@ class bld:
print cmd
return os.system(cmd)
def get_contents(self, env, target, source):
- return self.cmd %% (target, string.join(source, ' '))
+ return self.cmd %% (string.join(map(str, target)),
+ string.join(map(str, source)))
B = Builder(name = 'B', action = bld())
env = Environment(BUILDERS = [B])
env.B(target = 'foo.out', source = 'foo.in')
diff --git a/test/sconsign.py b/test/sconsign.py
index 396c399..a7c6971 100644
--- a/test/sconsign.py
+++ b/test/sconsign.py
@@ -39,8 +39,8 @@ def build1(target, source, env):
def build2(target, source, env):
import os
import os.path
- open(str(target), 'wb').write(open(str(source[0]), 'rb').read())
- dir, file = os.path.split(target)
+ open(str(target[0]), 'wb').write(open(str(source[0]), 'rb').read())
+ dir, file = os.path.split(str(target[0]))
os.chmod(dir, 0555)
return None