summaryrefslogtreecommitdiff
path: root/test/Fortran/F08FLAGS.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/Fortran/F08FLAGS.py')
-rw-r--r--test/Fortran/F08FLAGS.py26
1 files changed, 4 insertions, 22 deletions
diff --git a/test/Fortran/F08FLAGS.py b/test/Fortran/F08FLAGS.py
index c693c829..f91765b7 100644
--- a/test/Fortran/F08FLAGS.py
+++ b/test/Fortran/F08FLAGS.py
@@ -24,6 +24,7 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+import os
import TestSCons
_python_ = TestSCons._python_
@@ -32,33 +33,14 @@ test = TestSCons.TestSCons()
_exe = TestSCons._exe
test.file_fixture('mylink.py')
-
-test.write('myfortran.py', r"""
-import getopt
-import sys
-comment = '#' + sys.argv[1]
-opts, args = getopt.getopt(sys.argv[2:], 'co:xy')
-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[:len(comment)] != comment:
- 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 = [],
- F08 = r'%(_python_)s myfortran.py g08',
+ F08 = r'%(_python_)s myfortran_flags.py g08',
F08FLAGS = '-x',
- FORTRAN = r'%(_python_)s myfortran.py fortran',
+ FORTRAN = r'%(_python_)s myfortran_flags.py fortran',
FORTRANFLAGS = '-y')
env.Program(target = 'test01', source = 'test01.f')
env.Program(target = 'test02', source = 'test02.F')