From dd95a91a581b3ff41b22fa781d1337dd2a6577bc Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Tue, 17 Aug 2004 23:14:59 +0000 Subject: Portability fixes for Mac OS Xin tests. (Gary Oberbrunner) --- etc/TestCommon.py | 12 ++++++++++-- etc/TestSCons.py | 2 +- src/CHANGES.txt | 2 ++ test/CPPPATH.py | 6 +++--- test/LIBPATH.py | 2 +- test/QT.py | 4 +++- 6 files changed, 20 insertions(+), 8 deletions(-) diff --git a/etc/TestCommon.py b/etc/TestCommon.py index c7ee6f9..43cfddd 100644 --- a/etc/TestCommon.py +++ b/etc/TestCommon.py @@ -76,8 +76,8 @@ The TestCommon module also provides the following variables # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. __author__ = "Steven Knight " -__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 @@ -124,6 +124,14 @@ elif string.find(sys.platform, 'irix') != -1: 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' diff --git a/etc/TestSCons.py b/etc/TestSCons.py index 202f5d5..0a5469b 100644 --- a/etc/TestSCons.py +++ b/etc/TestSCons.py @@ -217,4 +217,4 @@ class TestSCons(TestCommon): # " 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?)*' diff --git a/src/CHANGES.txt b/src/CHANGES.txt index e8b3af1..ad02a85 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -218,6 +218,8 @@ RELEASE 0.95 - XXX - 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. diff --git a/test/CPPPATH.py b/test/CPPPATH.py index 05a61e8..6b41a38 100644 --- a/test/CPPPATH.py +++ b/test/CPPPATH.py @@ -205,9 +205,9 @@ env = Environment(CPPPATH = ['']) 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, diff --git a/test/LIBPATH.py b/test/LIBPATH.py index b9318a0..86e292a 100644 --- a/test/LIBPATH.py +++ b/test/LIBPATH.py @@ -152,7 +152,7 @@ test.up_to_date(arguments = '.') # 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', """ diff --git a/test/QT.py b/test/QT.py index 48148a9..51021a5 100644 --- a/test/QT.py +++ b/test/QT.py @@ -376,7 +376,9 @@ test.fail_test(not os.path.exists(test.workpath('work3', 'build', moc))) 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]) ############################################################################## -- cgit v0.12