summaryrefslogtreecommitdiffstats
path: root/test/Fortran/SHF90COMSTR.py
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2016-11-27 23:25:05 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2016-11-27 23:25:05 (GMT)
commit30247efa139711be7f2d7342c01b1c817985df0c (patch)
treeb4360925e1c5102aa58c51b5c68e64d0c01ca84f /test/Fortran/SHF90COMSTR.py
parent3031330216256cbff09b5631fdf68fa75d2439f2 (diff)
parentd938777da7f4b9e908075dabb1554bef9882d60f (diff)
downloadSCons-30247efa139711be7f2d7342c01b1c817985df0c.zip
SCons-30247efa139711be7f2d7342c01b1c817985df0c.tar.gz
SCons-30247efa139711be7f2d7342c01b1c817985df0c.tar.bz2
update from upstream
Diffstat (limited to 'test/Fortran/SHF90COMSTR.py')
-rw-r--r--test/Fortran/SHF90COMSTR.py21
1 files changed, 5 insertions, 16 deletions
diff --git a/test/Fortran/SHF90COMSTR.py b/test/Fortran/SHF90COMSTR.py
index a3353fa..4ea8ca6 100644
--- a/test/Fortran/SHF90COMSTR.py
+++ b/test/Fortran/SHF90COMSTR.py
@@ -30,36 +30,25 @@ _python_ = TestSCons._python_
test = TestSCons.TestSCons()
-
-
-test.write('myfc.py', r"""
-import sys
-fline = '#'+sys.argv[1]+'\n'
-outfile = open(sys.argv[2], 'wb')
-infile = open(sys.argv[3], 'rb')
-for l in [l for l in infile.readlines() if l != fline]:
- outfile.write(l)
-sys.exit(0)
-""")
+test.file_fixture('mycompile.py')
if not TestSCons.case_sensitive_suffixes('.f','.F'):
f90pp = 'f90'
else:
f90pp = 'f90pp'
-
test.write('SConstruct', """
-env = Environment(SHF90COM = r'%(_python_)s myfc.py f90 $TARGET $SOURCES',
+env = Environment(SHF90COM = r'%(_python_)s mycompile.py f90 $TARGET $SOURCES',
SHF90COMSTR = 'Building f90 $TARGET from $SOURCES',
- SHF90PPCOM = r'%(_python_)s myfc.py f90pp $TARGET $SOURCES',
+ SHF90PPCOM = r'%(_python_)s mycompile.py f90pp $TARGET $SOURCES',
SHF90PPCOMSTR = 'Building f90pp $TARGET from $SOURCES',
SHOBJPREFIX='', SHOBJSUFFIX='.shobj')
env.SharedObject(source = 'test01.f90')
env.SharedObject(source = 'test02.F90')
""" % locals())
-test.write('test01.f90', "A .f90 file.\n#f90\n")
-test.write('test02.F90', "A .F90 file.\n#%s\n" % f90pp)
+test.write('test01.f90', "A .f90 file.\n/*f90*/\n")
+test.write('test02.F90', "A .F90 file.\n/*%s*/\n" % f90pp)
test.run(stdout = test.wrap_stdout("""\
Building f90 test01.shobj from test01.f90