From 5cd93a3bba1c13e5823b6a2a2300b15cddc3ad1a Mon Sep 17 00:00:00 2001 From: stevenknight Date: Mon, 3 Aug 2009 04:53:52 +0000 Subject: [PATCH] Solaris test portability fixes. git-svn-id: http://scons.tigris.org/svn/scons/trunk@4318 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- 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 4cdb8fa6..0ef7662c 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 3ddc6861..96e00e71 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 d37de001..1552fd11 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' ) -- 2.26.2