From 732a637fdd83714e9984ef1998764a696fe8c03b Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Mon, 3 Aug 2009 04:53:52 +0000 Subject: Solaris test portability fixes. --- test/Clean/mkfifo.py | 14 ++++++++++++-- test/SWIG/SWIG.py | 2 ++ test/packaging/tar/bz2.py | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/test/Clean/mkfifo.py b/test/Clean/mkfifo.py index 4cdb8fa..0ef7662 100644 --- a/test/Clean/mkfifo.py +++ b/test/Clean/mkfifo.py @@ -48,13 +48,23 @@ test.run(arguments='-Q -q', stdout='Mkdir("testdir")\n') os.mkfifo('testdir/namedpipe') -expect = """\ +expect1 = """\ Mkdir("testdir") Path '%s' exists but isn't a file or directory. scons: Could not remove 'testdir': Directory not empty """ % os.path.join('testdir', 'namedpipe') -test.run(arguments='-c -Q -q', stdout=expect) +expect2 = """\ +Mkdir("testdir") +Path '%s' exists but isn't a file or directory. +scons: Could not remove 'testdir': File exists +""" % os.path.join('testdir', 'namedpipe') + +test.run(arguments='-c -Q -q') + +if test.stdout() not in [expect1, expect2]: + test.diff(expect1, test.stdout(), 'STDOUT ') + test.fail_test() test.must_exist(test.workpath('testdir/namedpipe')) diff --git a/test/SWIG/SWIG.py b/test/SWIG/SWIG.py index 3ddc686..96e00e7 100644 --- a/test/SWIG/SWIG.py +++ b/test/SWIG/SWIG.py @@ -64,6 +64,8 @@ env.Clone(SWIGFLAGS = '-c++').Program(target = 'test3', source = 'test3.i') """ % locals()) test.write('test1.i', r""" +#include +#include int main(int argc, char *argv[]) { argv[argc++] = "--"; diff --git a/test/packaging/tar/bz2.py b/test/packaging/tar/bz2.py index d37de00..1552fd1 100644 --- a/test/packaging/tar/bz2.py +++ b/test/packaging/tar/bz2.py @@ -45,7 +45,7 @@ int main( int argc, char* argv[] ) { return 0; } - """) +""") test.write('SConstruct', """ Program( 'src/main.c' ) -- cgit v0.12