# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
__author__ = "Steven Knight <knight at baldmt dot com>"
-__revision__ = "TestCommon.py 0.9.D001 2004/08/06 08:19:26 knight"
-__version__ = "0.9"
+__revision__ = "TestCommon.py 0.10.D001 2004/08/17 17:39:41 knight"
+__version__ = "0.10"
import os
import os.path
lib_suffix = '.a'
dll_prefix = 'lib'
dll_suffix = '.so'
+elif string.find(sys.platform, 'darwin') != -1:
+ exe_suffix = ''
+ obj_suffix = '.o'
+ shobj_suffix = '.os'
+ lib_prefix = 'lib'
+ lib_suffix = '.a'
+ dll_prefix = 'lib'
+ dll_suffix = '.dylib'
else:
exe_suffix = ''
obj_suffix = '.o'
# <file>" messages to be successful executions of the test (see
# test/AR.py for sample usage).
-noisy_ar=r'(ar: creating \S+\n?)*'
+noisy_ar=r'(ar: creating( archive)? \S+\n?)*'
- Have ParseConfig() add a returned -pthread flag to both $CCFLAGS
and $LINKFLAGS.
+ - Fix some test portability issues on Mac OS X (darwin).
+
From Simon Perkins:
- Fix a bug introduced in building shared libraries under MinGW.
env.Library('three', source = 'empty3.c')
""")
-test.write('empty1.c', "\n")
-test.write('empty2.c', "\n")
-test.write('empty3.c', "\n")
+test.write('empty1.c', "int a=0;\n")
+test.write('empty2.c', "int b=0;\n")
+test.write('empty3.c', "int c=0;\n")
test.run(arguments = '.',
stderr=TestSCons.noisy_ar,
# We need at least one file for some implementations of the Library
# builder, notably the SGI one.
-test.write('empty.c', '')
+test.write('empty.c', 'int a=0;\n')
# Check that a null-string LIBPATH doesn't blow up.
test.write('SConstruct', """
test.run(chdir='work3',
arguments = "build_dir=1 dup=0 " +
- test.workpath('work3', 'build_dup0', lib_aaa) )
+ test.workpath('work3', 'build_dup0', lib_aaa),
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.must_exist(['work3', 'build_dup0', moc])
##############################################################################