summaryrefslogtreecommitdiffstats
path: root/test/Fortran/F08FLAGS.py
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2016-11-28 18:38:24 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2016-11-28 18:38:24 (GMT)
commitdaab400692d467faf2af7ac035cc00a15711ce82 (patch)
treed3046061166476c2ab976b11aa87c20cd8e238f9 /test/Fortran/F08FLAGS.py
parenta3aa375f59535bfbe0aecdaabdeb40bc419125e1 (diff)
parent2a13b4ee309325261f69cbcb7bb69a78ef27a08a (diff)
downloadSCons-daab400692d467faf2af7ac035cc00a15711ce82.zip
SCons-daab400692d467faf2af7ac035cc00a15711ce82.tar.gz
SCons-daab400692d467faf2af7ac035cc00a15711ce82.tar.bz2
Merged in williamblevins/scons (pull request #376)
Python3 test fixes for Fortran/Side-effect.
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 c693c82..f91765b 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')