[commit: testsuite] ghc-7.6: MERGED: Use .hpc.<testname> for the hpc directory (38c3df9)
Ian Lynagh
igloo at earth.li
Thu Jan 24 20:11:55 CET 2013
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite
On branch : ghc-7.6
http://hackage.haskell.org/trac/ghc/changeset/38c3df910d223f61f8122e38f9ed7a7f4f5175af
>---------------------------------------------------------------
commit 38c3df910d223f61f8122e38f9ed7a7f4f5175af
Author: Ian Lynagh <ian at well-typed.com>
Date: Thu Jan 24 18:36:46 2013 +0000
MERGED: Use .hpc.<testname> for the hpc directory
All tests used to use .hpc, which caused failures when running in
parallel.
>---------------------------------------------------------------
config/ghc | 10 +++++-----
driver/testlib.py | 8 ++++----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/config/ghc b/config/ghc
index 3ce91af..ca5e47a 100644
--- a/config/ghc
+++ b/config/ghc
@@ -63,7 +63,7 @@ if (ghc_with_llvm == 1):
config.in_tree_compiler = in_tree_compiler
config.clean_only = clean_only
-config.way_flags = {
+config.way_flags = lambda name : {
'normal' : [],
'g1' : [],
'optasm' : ['-O', '-fasm'],
@@ -80,7 +80,7 @@ config.way_flags = {
'threaded1_ls' : ['-threaded', '-debug'],
'threaded2' : ['-O', '-threaded', '-eventlog'],
'threaded2_hT' : ['-O', '-threaded'],
- 'hpc' : ['-O', '-fhpc' ],
+ 'hpc' : ['-O', '-fhpc', '-hpcdir', '.hpc.' + name ],
'prof_hc_hb' : ['-O', '-prof', '-auto-all'],
'prof_hb' : ['-O', '-prof', '-auto-all'],
'prof_hd' : ['-O', '-prof', '-auto-all'],
@@ -120,15 +120,15 @@ config.way_rts_flags = {
prof_ways = map (lambda x: x[0], \
filter(lambda x: '-prof' in x[1], \
- config.way_flags.items()))
+ config.way_flags('dummy_name').items()))
threaded_ways = map (lambda x: 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], \
filter(lambda x: '-O' in x[1], \
- config.way_flags.items()))
+ config.way_flags('dummy_name').items()))
def get_compiler_info():
# This should really not go through the shell
diff --git a/driver/testlib.py b/driver/testlib.py
index 270e5ce..4d526c2 100644
--- a/driver/testlib.py
+++ b/driver/testlib.py
@@ -1097,7 +1097,7 @@ def simple_build( name, way, extra_hc_opts, should_fail, top_mod, link, addsuf,
+ config.compiler + "' " \
+ join(comp_flags,' ') + ' ' \
+ to_do + ' ' + srcname + ' ' \
- + join(config.way_flags[way],' ') + ' ' \
+ + join(config.way_flags(name)[way],' ') + ' ' \
+ extra_hc_opts + ' ' \
+ opts.extra_hc_opts + ' ' \
+ '>' + errname + ' 2>&1'
@@ -1277,7 +1277,7 @@ def interpreter_run( name, way, extra_hc_opts, compile_only, top_mod ):
cmd = "'" + config.compiler + "' " \
+ join(getTestOpts().compiler_always_flags,' ') + ' ' \
+ srcname + ' ' \
- + join(config.way_flags[way],' ') + ' ' \
+ + join(config.way_flags(name)[way],' ') + ' ' \
+ extra_hc_opts + ' ' \
+ getTestOpts().extra_hc_opts + ' ' \
+ '<' + scriptname + ' 1>' + outname + ' 2>' + errname
@@ -1370,7 +1370,7 @@ def extcore_run( name, way, extra_hc_opts, compile_only, top_mod ):
cmd = 'cd ' + getTestOpts().testdir + " && '" \
+ config.compiler + "' " \
+ join(getTestOpts().compiler_always_flags,' ') + ' ' \
- + join(config.way_flags[way],' ') + ' ' \
+ + join(config.way_flags(name)[way],' ') + ' ' \
+ extra_hc_opts + ' ' \
+ getTestOpts().extra_hc_opts \
+ to_do \
@@ -1395,7 +1395,7 @@ def extcore_run( name, way, extra_hc_opts, compile_only, top_mod ):
deplist2 = string.replace(deplist,'.lhs,', '.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]),' ')
cmd = 'cd ' + getTestOpts().testdir + " && '" \
+ config.compiler + "' " \
More information about the ghc-commits
mailing list