diff options
author | Steven Knight <knight@baldmt.com> | 2003-11-10 16:13:15 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-11-10 16:13:15 (GMT) |
commit | 01c5472bd1ee03fd15b52e18eaf955dd75d14492 (patch) | |
tree | 386f3ae3eac37497adf92f1a1539cd9f7ce13bd3 /test/gnutools.py | |
parent | a1cc9f13fe88795ae6d1ea043694381510a4a078 (diff) | |
download | SCons-01c5472bd1ee03fd15b52e18eaf955dd75d14492.zip SCons-01c5472bd1ee03fd15b52e18eaf955dd75d14492.tar.gz SCons-01c5472bd1ee03fd15b52e18eaf955dd75d14492.tar.bz2 |
Use sys.stdout.write() instead of print so line feeds in -j output will stay (more) consistent. Fix suffix-handling on case-insensitive Cygwin systems. Test fixes for Cygwin portability. (Chad Austin)
Diffstat (limited to 'test/gnutools.py')
-rw-r--r-- | test/gnutools.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/test/gnutools.py b/test/gnutools.py index ebc08c3..d5173ee 100644 --- a/test/gnutools.py +++ b/test/gnutools.py @@ -30,10 +30,11 @@ Testing the gnu tool chain, i.e. the tools 'gcc', 'g++' and 'gnulink'. import TestSCons import string +import sys python = TestSCons.python _exe = TestSCons._exe _dll = TestSCons._dll -lib_ = TestSCons.lib_ +dll_ = TestSCons.dll_ test = TestSCons.TestSCons() test.subdir('gnutools') @@ -124,19 +125,24 @@ def testObject(test, obj, command, flags): if not res: print "'"+obj+command+flags+"'"+"!='"+str(line1)+"'" return res +if sys.platform == 'cygwin': + fpic = '' +else: + fpic = '-fPIC ' + test.fail_test(not testObject(test, 'cfile1.o', 'gcc', '-c') or not testObject(test, 'cfile2.o', 'gcc', '-c') or not testObject(test, 'cppfile1.o', 'g++', '-c') or not testObject(test, 'cppfile2.o', 'g++', '-c') or - not testObject(test, 'cfile1.os', 'gcc', '-fPIC -c') or - not testObject(test, 'cfile2.os', 'gcc', '-fPIC -c') or - not testObject(test, 'cppfile1.os', 'g++', '-fPIC -c') or - not testObject(test, 'cppfile2.os', 'g++', '-fPIC -c') or + not testObject(test, 'cfile1.os', 'gcc', fpic + '-c') or + not testObject(test, 'cfile2.os', 'gcc', fpic + '-c') or + not testObject(test, 'cppfile1.os', 'g++', fpic + '-c') or + not testObject(test, 'cppfile2.os', 'g++', fpic + '-c') or not testObject(test, 'c-only' + _exe, 'gcc', '') or not testObject(test, 'cpp-only' + _exe, 'g++', '') or not testObject(test, 'c-and-cpp' + _exe, 'g++', '') or - not testObject(test, lib_ + 'c-only' + _dll, 'gcc', '-shared') or - not testObject(test, lib_ + 'cpp-only' + _dll, 'g++', '-shared') or - not testObject(test, lib_ + 'c-and-cpp' + _dll, 'g++', '-shared')) + not testObject(test, dll_ + 'c-only' + _dll, 'gcc', '-shared') or + not testObject(test, dll_ + 'cpp-only' + _dll, 'g++', '-shared') or + not testObject(test, dll_ + 'c-and-cpp' + _dll, 'g++', '-shared')) test.pass_test() |