summaryrefslogtreecommitdiff
path: root/test/gnutools.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-11-10 16:13:15 +0000
committerSteven Knight <knight@baldmt.com>2003-11-10 16:13:15 +0000
commit8de5ae79c1f6096683ee125b38b2e2d7525b7f07 (patch)
tree386f3ae3eac37497adf92f1a1539cd9f7ce13bd3 /test/gnutools.py
parent9dd1434a94d2472b6f6d2956eb2b3e422d251a75 (diff)
downloadscons-8de5ae79c1f6096683ee125b38b2e2d7525b7f07.tar.gz
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.py22
1 files changed, 14 insertions, 8 deletions
diff --git a/test/gnutools.py b/test/gnutools.py
index ebc08c32..d5173ee2 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()