summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2016-12-17 18:08:59 -0500
committerBen Gamari <ben@smart-cactus.org>2016-12-17 18:09:40 -0500
commit90cfa84981ee1f9fb756a3af1bd707674c18c034 (patch)
tree5c13cf459f847f69e595188c7bbd846e9d1ed17d /testsuite
parent2a02040b2e23daa4f791afc290c33c9bbe3c620c (diff)
downloadhaskell-90cfa84981ee1f9fb756a3af1bd707674c18c034.tar.gz
Run some tests with -fexternal-interpreter -prof
We don't have any other tests for this, except one Template Haskell test. This would have caught the bug I just fixed in D2868, at least when validating with profiling on. Test Plan: Ran tests Reviewers: niteria, austin, erikd, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2869 GHC Trac Issues: #5654
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/config/ghc4
-rw-r--r--testsuite/tests/profiling/should_run/all.T24
2 files changed, 21 insertions, 7 deletions
diff --git a/testsuite/config/ghc b/testsuite/config/ghc
index b7d9cbc08c..b9991d7729 100644
--- a/testsuite/config/ghc
+++ b/testsuite/config/ghc
@@ -30,7 +30,7 @@ config.other_ways = ['prof', 'normal_h',
'llvm', 'debugllvm',
'profllvm', 'profoptllvm', 'profthreadedllvm',
'debug',
- 'ghci-ext',
+ 'ghci-ext', 'ghci-ext-prof',
'ext-interp']
if (ghc_with_native_codegen == 1):
@@ -100,6 +100,7 @@ config.way_flags = {
'profoptllvm' : ['-O', '-prof', '-static', '-fprof-auto', '-fllvm'],
'profthreadedllvm' : ['-O', '-prof', '-static', '-fprof-auto', '-threaded', '-fllvm'],
'ghci-ext' : ['--interactive', '-v0', '-ignore-dot-ghci', '-fno-ghci-history', '-fexternal-interpreter', '+RTS', '-I0.1', '-RTS'],
+ 'ghci-ext-prof' : ['--interactive', '-v0', '-ignore-dot-ghci', '-fno-ghci-history', '-fexternal-interpreter', '-prof', '+RTS', '-I0.1', '-RTS'],
'ext-interp' : ['-fexternal-interpreter'],
}
@@ -137,6 +138,7 @@ config.way_rts_flags = {
'profoptllvm' : ['-hc', '-p'],
'profthreadedllvm' : ['-p'],
'ghci-ext' : [],
+ 'ghci-ext-prof' : [],
'ext-interp' : [],
}
diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T
index 5faca297b6..875a98e2dd 100644
--- a/testsuite/tests/profiling/should_run/all.T
+++ b/testsuite/tests/profiling/should_run/all.T
@@ -13,7 +13,7 @@ test('T11489', [req_profiling, extra_clean(['T11489.prof', 'T11489.hp'])],
# Below this line, run tests only with profiling ways.
setTestOpts(req_profiling)
-setTestOpts(extra_ways(['prof']))
+setTestOpts(extra_ways(['prof', 'ghci-ext-prof']))
setTestOpts(only_ways(prof_ways))
setTestOpts(keep_prof_callstacks)
@@ -21,7 +21,8 @@ extra_prof_ways = ['prof', 'prof_hc_hb', 'prof_hb', 'prof_hd', 'prof_hy', 'prof_
expect_broken_for_10037 = expect_broken_for(
10037,
- [w for w in prof_ways if w not in opt_ways]) # e.g. prof and profllvm
+ [w for w in prof_ways if w not in opt_ways and w != 'ghci-ext-prof'])
+ # e.g. prof and profllvm
test('heapprof001',
[when(have_profiling(), extra_ways(extra_prof_ways)), extra_run_opts('7')],
@@ -69,7 +70,12 @@ test('T949', [extra_ways(extra_prof_ways)], compile_and_run, [''])
# The results for 'prof' are fine, but the ordering changes.
# We care more about getting the optimised results right, so ignoring
# this for now.
-test('ioprof', [expect_broken_for_10037, exit_code(1)], compile_and_run,
+test('ioprof',
+ [expect_broken_for_10037,
+ exit_code(1),
+ omit_ways(['ghci-ext-prof']) # doesn't work with exit_code(1)
+ ],
+ compile_and_run,
['-fno-full-laziness -fno-state-hack']) # Note [consistent stacks]
# These two examples are from the User's Guide:
@@ -89,11 +95,17 @@ test('T5559', [], compile_and_run, [''])
# -fno-state-hack
# -fno-full-laziness
-test('callstack001', [expect_broken_for_10037],
+test('callstack001',
# unoptimised results are different w.r.t. CAF attribution
- compile_and_run, ['-fprof-auto-calls -fno-full-laziness -fno-state-hack'])
+ [ expect_broken_for_10037,
+ omit_ways(['ghci-ext-prof']), # produces a different stack
+ ], compile_and_run,
+ ['-fprof-auto-calls -fno-full-laziness -fno-state-hack'])
-test('callstack002', [], compile_and_run,
+test('callstack002',
+ [ omit_ways(['ghci-ext-prof']), # produces a different stack
+ ],
+ compile_and_run,
['-fprof-auto-calls -fno-full-laziness -fno-state-hack'])
# Should not stack overflow with -prof -fprof-auto