summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2006-02-22 03:18:38 (GMT)
committerSteven Knight <knight@baldmt.com>2006-02-22 03:18:38 (GMT)
commit39b08fdb0fb2eac589fdbbb93c2e45bf6d4d21d5 (patch)
treee5f975a63b2c77e2f1bbb44f79ef678776ebc329 /test
parentb47d0563f5e57520c3e67d7beef04858c81f459d (diff)
downloadSCons-39b08fdb0fb2eac589fdbbb93c2e45bf6d4d21d5.zip
SCons-39b08fdb0fb2eac589fdbbb93c2e45bf6d4d21d5.tar.gz
SCons-39b08fdb0fb2eac589fdbbb93c2e45bf6d4d21d5.tar.bz2
Portability fixes (win32) in tests and test infrastructure.
Diffstat (limited to 'test')
-rw-r--r--test/Perforce/Perforce.py14
-rw-r--r--test/rebuild-generated.py4
2 files changed, 12 insertions, 6 deletions
diff --git a/test/Perforce/Perforce.py b/test/Perforce/Perforce.py
index 04127f5..f813f10 100644
--- a/test/Perforce/Perforce.py
+++ b/test/Perforce/Perforce.py
@@ -59,11 +59,15 @@ class TestPerforce(TestSCons.TestSCons):
if self.p4d:
self.p4portflags = ['-p', self.host + ':1777']
self.subdir('depot', ['depot', 'testme'])
- args = [self.p4d, '-q', '-d'] + \
- self.p4portflags + \
- ['-J', 'Journal',
- '-L', 'Log',
- '-r', self.workpath('depot')]
+ def quote_space(a):
+ if ' ' in a:
+ a = '"%s"' % a
+ return a
+ args = map(quote_space, [self.p4d, '-q', '-d'] + \
+ self.p4portflags + \
+ ['-J', 'Journal',
+ '-L', 'Log',
+ '-r', self.workpath('depot')])
# We don't use self.run() because the TestCmd logic will hang
# waiting for the daemon to exit, even when we pass it
diff --git a/test/rebuild-generated.py b/test/rebuild-generated.py
index 973fc8f..7f8a6d5 100644
--- a/test/rebuild-generated.py
+++ b/test/rebuild-generated.py
@@ -93,7 +93,9 @@ osLinuxModule = env.StaticObject(
test.write('main.cc', """\
int
main(int, char *[])
-{}
+{
+ return (0);
+}
""")
test.write('target.cc', """\