summaryrefslogtreecommitdiffstats
path: root/test/Fortran/F77FLAGS.py
diff options
context:
space:
mode:
authorWilliam Blevins <wblevins001@gmail.com>2016-11-28 02:27:10 (GMT)
committerWilliam Blevins <wblevins001@gmail.com>2016-11-28 02:27:10 (GMT)
commit51abbd22089b2274161ee95d48d00525d7905b01 (patch)
tree52c998b0a8faf434f306c5498199e6ba468ff261 /test/Fortran/F77FLAGS.py
parente3d5fdee7267b8e07873f77afe4f2ecc46f82f16 (diff)
downloadSCons-51abbd22089b2274161ee95d48d00525d7905b01.zip
SCons-51abbd22089b2274161ee95d48d00525d7905b01.tar.gz
SCons-51abbd22089b2274161ee95d48d00525d7905b01.tar.bz2
Python3 test fixes for Fortran/Side-effect.
Diffstat (limited to 'test/Fortran/F77FLAGS.py')
-rw-r--r--test/Fortran/F77FLAGS.py23
1 files changed, 3 insertions, 20 deletions
diff --git a/test/Fortran/F77FLAGS.py b/test/Fortran/F77FLAGS.py
index 9b4c56c..d4e6e8a 100644
--- a/test/Fortran/F77FLAGS.py
+++ b/test/Fortran/F77FLAGS.py
@@ -24,6 +24,7 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+import os
import TestSCons
_python_ = TestSCons._python_
@@ -32,30 +33,12 @@ test = TestSCons.TestSCons()
_exe = TestSCons._exe
test.file_fixture('mylink.py')
-
-test.write('myg77.py', r"""
-import getopt
-import sys
-opts, args = getopt.getopt(sys.argv[1:], 'co:x')
-optstring = ''
-for opt, arg in opts:
- if opt == '-o': out = arg
- else: optstring = optstring + ' ' + opt
-infile = open(args[0], 'rb')
-outfile = open(out, 'wb')
-outfile.write(optstring + "\n")
-for l in infile.readlines():
- if l[:4] != '#g77':
- outfile.write(l)
-sys.exit(0)
-""")
-
-
+test.file_fixture(os.path.join('fixture', 'myfortran_flags.py'))
test.write('SConstruct', """
env = Environment(LINK = r'%(_python_)s mylink.py',
LINKFLAGS = [],
- F77 = r'%(_python_)s myg77.py',
+ F77 = r'%(_python_)s myfortran_flags.py g77',
F77FLAGS = '-x')
env.Program(target = 'test09', source = 'test09.f77')
env.Program(target = 'test10', source = 'test10.F77')