Commit 33af6479 authored by ian@well-typed.com's avatar ian@well-typed.com

Use .hpc.<testname> for the hpc directory

All tests used to use .hpc, which caused failures when running in
parallel.
parent 70dc7123
...@@ -80,7 +80,7 @@ if (ghc_with_llvm == 1): ...@@ -80,7 +80,7 @@ if (ghc_with_llvm == 1):
config.in_tree_compiler = in_tree_compiler config.in_tree_compiler = in_tree_compiler
config.clean_only = clean_only config.clean_only = clean_only
config.way_flags = { config.way_flags = lambda name : {
'normal' : [], 'normal' : [],
'g1' : [], 'g1' : [],
'optasm' : ['-O', '-fasm'], 'optasm' : ['-O', '-fasm'],
...@@ -97,7 +97,7 @@ config.way_flags = { ...@@ -97,7 +97,7 @@ config.way_flags = {
'threaded1_ls' : ['-threaded', '-debug'], 'threaded1_ls' : ['-threaded', '-debug'],
'threaded2' : ['-O', '-threaded', '-eventlog'], 'threaded2' : ['-O', '-threaded', '-eventlog'],
'threaded2_hT' : ['-O', '-threaded'], 'threaded2_hT' : ['-O', '-threaded'],
'hpc' : ['-O', '-fhpc' ], 'hpc' : ['-O', '-fhpc', '-hpcdir', '.hpc.' + name ],
'prof_hc_hb' : ['-O', '-prof', '-static', '-auto-all'], 'prof_hc_hb' : ['-O', '-prof', '-static', '-auto-all'],
'prof_hb' : ['-O', '-prof', '-static', '-auto-all'], 'prof_hb' : ['-O', '-prof', '-static', '-auto-all'],
'prof_hd' : ['-O', '-prof', '-static', '-auto-all'], 'prof_hd' : ['-O', '-prof', '-static', '-auto-all'],
...@@ -153,15 +153,15 @@ config.way_rts_flags = { ...@@ -153,15 +153,15 @@ config.way_rts_flags = {
prof_ways = map (lambda x: x[0], \ prof_ways = map (lambda x: x[0], \
filter(lambda x: '-prof' in x[1], \ filter(lambda x: '-prof' in x[1], \
config.way_flags.items())) config.way_flags('dummy_name').items()))
threaded_ways = map (lambda x: x[0], \ threaded_ways = map (lambda x: x[0], \
filter(lambda x: '-threaded' in x[1] or 'ghci' == x[0], \ filter(lambda x: '-threaded' in x[1] or 'ghci' == x[0], \
config.way_flags.items())) config.way_flags('dummy_name').items()))
opt_ways = map (lambda x: x[0], \ opt_ways = map (lambda x: x[0], \
filter(lambda x: '-O' in x[1], \ filter(lambda x: '-O' in x[1], \
config.way_flags.items())) config.way_flags('dummy_name').items()))
def get_compiler_info(): def get_compiler_info():
# This should really not go through the shell # This should really not go through the shell
......
...@@ -1229,7 +1229,7 @@ def simple_build( name, way, extra_hc_opts, should_fail, top_mod, link, addsuf, ...@@ -1229,7 +1229,7 @@ def simple_build( name, way, extra_hc_opts, should_fail, top_mod, link, addsuf,
+ config.compiler + "' " \ + config.compiler + "' " \
+ join(comp_flags,' ') + ' ' \ + join(comp_flags,' ') + ' ' \
+ to_do + ' ' + srcname + ' ' \ + to_do + ' ' + srcname + ' ' \
+ join(config.way_flags[way],' ') + ' ' \ + join(config.way_flags(name)[way],' ') + ' ' \
+ extra_hc_opts + ' ' \ + extra_hc_opts + ' ' \
+ opts.extra_hc_opts + ' ' \ + opts.extra_hc_opts + ' ' \
+ '>' + errname + ' 2>&1' + '>' + errname + ' 2>&1'
...@@ -1415,7 +1415,7 @@ def interpreter_run( name, way, extra_hc_opts, compile_only, top_mod ): ...@@ -1415,7 +1415,7 @@ def interpreter_run( name, way, extra_hc_opts, compile_only, top_mod ):
cmd = "'" + config.compiler + "' " \ cmd = "'" + config.compiler + "' " \
+ join(flags,' ') + ' ' \ + join(flags,' ') + ' ' \
+ srcname + ' ' \ + srcname + ' ' \
+ join(config.way_flags[way],' ') + ' ' \ + join(config.way_flags(name)[way],' ') + ' ' \
+ extra_hc_opts + ' ' \ + extra_hc_opts + ' ' \
+ getTestOpts().extra_hc_opts + ' ' \ + getTestOpts().extra_hc_opts + ' ' \
+ '<' + scriptname + ' 1>' + outname + ' 2>' + errname + '<' + scriptname + ' 1>' + outname + ' 2>' + errname
...@@ -1511,7 +1511,7 @@ def extcore_run( name, way, extra_hc_opts, compile_only, top_mod ): ...@@ -1511,7 +1511,7 @@ def extcore_run( name, way, extra_hc_opts, compile_only, top_mod ):
cmd = 'cd ' + getTestOpts().testdir + " && '" \ cmd = 'cd ' + getTestOpts().testdir + " && '" \
+ config.compiler + "' " \ + config.compiler + "' " \
+ join(flags,' ') + ' ' \ + join(flags,' ') + ' ' \
+ join(config.way_flags[way],' ') + ' ' \ + join(config.way_flags(name)[way],' ') + ' ' \
+ extra_hc_opts + ' ' \ + extra_hc_opts + ' ' \
+ getTestOpts().extra_hc_opts \ + getTestOpts().extra_hc_opts \
+ to_do \ + to_do \
...@@ -1536,7 +1536,7 @@ def extcore_run( name, way, extra_hc_opts, compile_only, top_mod ): ...@@ -1536,7 +1536,7 @@ def extcore_run( name, way, extra_hc_opts, compile_only, top_mod ):
deplist2 = string.replace(deplist,'.lhs,', '.hcr'); deplist2 = string.replace(deplist,'.lhs,', '.hcr');
to_compile = string.replace(deplist2,'.hs,', '.hcr'); to_compile = string.replace(deplist2,'.hs,', '.hcr');
flags = join(filter(lambda f: f != '-fext-core',config.way_flags[way]),' ') flags = join(filter(lambda f: f != '-fext-core',config.way_flags(name)[way]),' ')
if getTestOpts().outputdir != None: if getTestOpts().outputdir != None:
flags.extend(["-outputdir", getTestOpts().outputdir]) flags.extend(["-outputdir", getTestOpts().outputdir])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment