From 76cabed7177decc2857f61594792be9b80c6c944 Mon Sep 17 00:00:00 2001 From: stevenknight Date: Tue, 17 Aug 2004 23:14:59 +0000 Subject: [PATCH] Portability fixes for Mac OS Xin tests. (Gary Oberbrunner) git-svn-id: http://scons.tigris.org/svn/scons/trunk@1035 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- 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 c7ee6f98..43cfdddf 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 202f5d5d..0a5469b0 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 e8b3af16..ad02a851 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 05a61e81..6b41a38a 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 b9318a0a..86e292a1 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 48148a92..51021a53 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]) ############################################################################## -- 2.26.2