summaryrefslogtreecommitdiffstats
path: root/test/SharedLibrary.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-01-18 14:32:51 (GMT)
committerSteven Knight <knight@baldmt.com>2003-01-18 14:32:51 (GMT)
commite7311129d841fe777bfe2d83c46033f34dac4709 (patch)
treea24fdcf4d185371398684f758fc74a3a856181fc /test/SharedLibrary.py
parent9174c12d92d6a32c087bd5b891022ef5dc6f426f (diff)
downloadSCons-e7311129d841fe777bfe2d83c46033f34dac4709.zip
SCons-e7311129d841fe777bfe2d83c46033f34dac4709.tar.gz
SCons-e7311129d841fe777bfe2d83c46033f34dac4709.tar.bz2
Make shared/static objects less irritating. (Anthony Roach)
Diffstat (limited to 'test/SharedLibrary.py')
-rw-r--r--test/SharedLibrary.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/test/SharedLibrary.py b/test/SharedLibrary.py
index aba088f..79c331c 100644
--- a/test/SharedLibrary.py
+++ b/test/SharedLibrary.py
@@ -34,10 +34,15 @@ import TestSCons
test = TestSCons.TestSCons(match=TestCmd.match_re)
test.write('SConstruct', """
+import sys
env=Environment(WIN32_INSERT_DEF=1)
env2 = Environment(LIBS = [ 'foo1', 'foo2', 'foo3' ],
LIBPATH = [ '.' ])
env.SharedLibrary(target = 'foo1', source = 'f1.c')
+if sys.platform == 'win32':
+ env.StaticLibrary(target = 'foo1-static', source = 'f1.c')
+else:
+ env.StaticLibrary(target = 'foo1', source = 'f1.c')
env.SharedLibrary(target = 'foo2', source = Split('f2a.c f2b.c f2c.c'))
env.SharedLibrary(target = 'foo3', source = ['f3a.c', 'f3b.c', 'f3c.c'])
env2.Program(target = 'prog', source = 'prog.c')
@@ -191,15 +196,14 @@ if os.name == 'posix':
test.run(program = test.workpath('prog'),
stdout = "f1.c\nf2a.c\nf2b.c\nf2c.c\nf3a.c\nf3b.c\nf3c.c\nprog.c\n")
-test.run(arguments = '-f SConstructFoo', status=2, stderr='''
+if sys.platform == 'win32':
+ test.run(arguments = '-f SConstructFoo')
+else:
+ test.run(arguments = '-f SConstructFoo', status=2, stderr='''
scons: \*\*\* Source file: foo\..* is static and is not compatible with shared target: .*
-'''
-)
+''')
-test.run(arguments = '-f SConstructFoo2', status=2, stderr='''
-scons: \*\*\* Source file: bar\..* is shared and is not compatible with static target: .*
-'''
-)
+test.run(arguments = '-f SConstructFoo2')
if sys.platform == 'win32':
# Make sure we don't insert a .def source file (when