summaryrefslogtreecommitdiffstats
path: root/test/Fortran/link-with-cxx.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2009-01-18 19:33:53 (GMT)
committerSteven Knight <knight@baldmt.com>2009-01-18 19:33:53 (GMT)
commit6d699199b32405f27c8e76b5164bdc57fcd69602 (patch)
tree05c369c0cf64c9d7514b08db774ba6512cc587ca /test/Fortran/link-with-cxx.py
parent79a086c22c6964a04ab88a382aaba3626c216b5a (diff)
downloadSCons-6d699199b32405f27c8e76b5164bdc57fcd69602.zip
SCons-6d699199b32405f27c8e76b5164bdc57fcd69602.tar.gz
SCons-6d699199b32405f27c8e76b5164bdc57fcd69602.tar.bz2
Various Windows fixes:
* Restore correct code to detect a bad drive on Windows. * Update the bad drive error message to include the target name. * Update SConfTests.py to print the config.log on error. * Fix the smart_link() error message to not use repr() of a path so escaping the \ separators on Windows doesn't interfere with regex matchs. * Update regexes in test/VariantDir/reflect.py to accomodate command-line re-ordering to put the /OUT: first in the line. * Explicitly check for smart_link() messages even on Windows.
Diffstat (limited to 'test/Fortran/link-with-cxx.py')
-rw-r--r--test/Fortran/link-with-cxx.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/test/Fortran/link-with-cxx.py b/test/Fortran/link-with-cxx.py
index 6c05ae1..ae0ff67 100644
--- a/test/Fortran/link-with-cxx.py
+++ b/test/Fortran/link-with-cxx.py
@@ -25,8 +25,8 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
"""
-Verify the warnings message used when attempting to link C++ and
-Fortran object files, and the ability to suppress them with the
+Verify the smart_link() warning messages used when attempting to link
+C++ and Fortran object files, and the ability to suppress them with the
right --warn= options.
"""
@@ -41,8 +41,13 @@ test = TestSCons.TestSCons(match = TestSCons.match_re)
test.write('test_linker.py', r"""
import sys
-outfile = open(sys.argv[2], 'wb')
-for infile in sys.argv[3:]:
+if sys.argv[1] == '-o':
+ outfile = open(sys.argv[2], 'wb')
+ infiles = sys.argv[3:]
+elif sys.argv[1][:5] == '/OUT:':
+ outfile = open(sys.argv[1][5:], 'wb')
+ infiles = sys.argv[2:]
+for infile in infiles:
outfile.write(open(infile, 'rb').read())
outfile.close()
sys.exit(0)
@@ -60,12 +65,16 @@ sys.exit(0)
test.write('SConstruct', """
+import SCons.Tool.link
def copier(target, source, env):
s = str(source[0])
t = str(target[0])
open(t, 'wb').write(open(s, 'rb').read())
env = Environment(CXX = r'%(_python_)s test_linker.py',
CXXCOM = Action(copier),
+ SMARTLINK = SCons.Tool.link.smart_link,
+ LINK = r'$SMARTLINK',
+ LINKFLAGS = '',
# We want to re-define this as follows (so as to
# not rely on a real Fortran compiler) but can't
# because $FORTRANCOM is defined with an extra space