summaryrefslogtreecommitdiff
path: root/testsuite/driver/testlib.py
diff options
context:
space:
mode:
authorAustin Seipp <austin@well-typed.com>2014-04-27 21:11:23 -0500
committerAustin Seipp <austin@well-typed.com>2014-05-03 11:18:04 -0500
commit5bf22f06ef71f61094de7564dee770f136d5481a (patch)
tree7121e4705dea853871b6d43dc587f78b68aeb99c /testsuite/driver/testlib.py
parenta05f8dd15b51db7e71ab783182548f1af6dd2ceb (diff)
downloadhaskell-5bf22f06ef71f61094de7564dee770f136d5481a.tar.gz
Remove external core
Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'testsuite/driver/testlib.py')
-rw-r--r--testsuite/driver/testlib.py95
1 files changed, 0 insertions, 95 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 0657db83d3..3479b6a5ba 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -996,8 +996,6 @@ def compile_and_run__( name, way, top_mod, extra_mods, extra_hc_opts ):
if way == 'ghci': # interpreted...
return interpreter_run( name, way, extra_hc_opts, 0, top_mod )
- elif way == 'extcore' or way == 'optextcore' :
- return extcore_run( name, way, extra_hc_opts, 0, top_mod )
else: # compiled...
force = 0
if extra_mods:
@@ -1385,99 +1383,6 @@ def split_file(in_fn, delimiter, out1_fn, out2_fn):
out2.close()
# -----------------------------------------------------------------------------
-# Generate External Core for the given program, then compile the resulting Core
-# and compare its output to the expected output
-
-def extcore_run( name, way, extra_hc_opts, compile_only, top_mod ):
-
- depsfilename = qualify(name, 'deps')
- errname = add_suffix(name, 'comp.stderr')
- qerrname = qualify(errname,'')
-
- hcname = qualify(name, 'hc')
- oname = qualify(name, 'o')
-
- rm_no_fail( qerrname )
- rm_no_fail( qualify(name, '') )
-
- if (top_mod == ''):
- srcname = add_hs_lhs_suffix(name)
- else:
- srcname = top_mod
-
- qcorefilename = qualify(name, 'hcr')
- corefilename = add_suffix(name, 'hcr')
- rm_no_fail(qcorefilename)
-
- # Generate External Core
-
- if (top_mod == ''):
- to_do = ' ' + srcname + ' '
- else:
- to_do = ' --make ' + top_mod + ' '
-
- flags = copy.copy(getTestOpts().compiler_always_flags)
- if getTestOpts().outputdir != None:
- flags.extend(["-outputdir", getTestOpts().outputdir])
- cmd = 'cd ' + getTestOpts().testdir + " && '" \
- + config.compiler + "' " \
- + join(flags,' ') + ' ' \
- + join(config.way_flags(name)[way],' ') + ' ' \
- + extra_hc_opts + ' ' \
- + getTestOpts().extra_hc_opts \
- + to_do \
- + '>' + errname + ' 2>&1'
- result = runCmdFor(name, cmd)
-
- exit_code = result >> 8
-
- if exit_code != 0:
- if_verbose(1,'Compiling to External Core failed (status ' + `result` + ') errors were:')
- if_verbose_dump(1,qerrname)
- return failBecause('ext core exit code non-0')
-
- # Compile the resulting files -- if there's more than one module, we need to read the output
- # of the previous compilation in order to find the dependencies
- if (top_mod == ''):
- to_compile = corefilename
- else:
- result = runCmdFor(name, 'grep Compiling ' + qerrname + ' | awk \'{print $4}\' > ' + depsfilename)
- deps = open(depsfilename).read()
- deplist = string.replace(deps, '\n',' ');
- deplist2 = string.replace(deplist,'.lhs,', '.hcr');
- to_compile = string.replace(deplist2,'.hs,', '.hcr');
-
- flags = join(filter(lambda f: f != '-fext-core',config.way_flags(name)[way]),' ')
- if getTestOpts().outputdir != None:
- flags.extend(["-outputdir", getTestOpts().outputdir])
-
- cmd = 'cd ' + getTestOpts().testdir + " && '" \
- + config.compiler + "' " \
- + join(getTestOpts().compiler_always_flags,' ') + ' ' \
- + to_compile + ' ' \
- + extra_hc_opts + ' ' \
- + getTestOpts().extra_hc_opts + ' ' \
- + flags \
- + ' -fglasgow-exts -o ' + name \
- + '>' + errname + ' 2>&1'
-
- result = runCmdFor(name, cmd)
- exit_code = result >> 8
-
- if exit_code != 0:
- if_verbose(1,'Compiling External Core file(s) failed (status ' + `result` + ') errors were:')
- if_verbose_dump(1,qerrname)
- return failBecause('ext core exit code non-0')
-
- # Clean up
- rm_no_fail ( oname )
- rm_no_fail ( hcname )
- rm_no_fail ( qcorefilename )
- rm_no_fail ( depsfilename )
-
- return simple_run ( name, way, './'+name, getTestOpts().extra_run_opts )
-
-# -----------------------------------------------------------------------------
# Utils
def check_stdout_ok( name ):