summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2015-11-07 09:39:05 +0000
committerSimon Marlow <marlowsd@gmail.com>2015-11-07 09:39:05 +0000
commitce1f1607ed7f8fedd2f63c8610cafefd59baaf32 (patch)
tree718641160c3d93a2ca974deec1e228cb09e1a97e /testsuite
parenta58eeb7febd67c93dab82de7049ef1dcdecd34e9 (diff)
downloadhaskell-ce1f1607ed7f8fedd2f63c8610cafefd59baaf32.tar.gz
Make GHCi & TH work when the compiler is built with -prof
Summary: Amazingly, there were zero changes to the byte code generator and very few changes to the interpreter - mainly because we've used good abstractions that hide the differences between profiling and non-profiling. So that bit was pleasantly straightforward, but there were a pile of other wibbles to get the whole test suite through. Note that a compiler built with -prof is now like one built with -dynamic, in that to use TH you have to build the code the same way. For dynamic, we automatically enable -dynamic-too when TH is required, but we don't have anything equivalent for profiling, so you have to explicitly use -prof when building code that uses TH with a profiled compiler. For this reason Cabal won't work with TH. We don't expect to ship a profiled compiler, so I think that's OK. Test Plan: validate with GhcProfiled=YES in validate.mk Reviewers: goldfire, bgamari, rwbarton, austin, hvr, erikd, ezyang Reviewed By: ezyang Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1407 GHC Trac Issues: #4837, #545
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/config/ghc6
-rw-r--r--testsuite/mk/boilerplate.mk4
-rw-r--r--testsuite/mk/ghc-config.hs1
-rw-r--r--testsuite/tests/annotations/should_compile/all.T3
-rw-r--r--testsuite/tests/annotations/should_compile/th/Makefile10
-rw-r--r--testsuite/tests/annotations/should_compile/th/all.T2
-rw-r--r--testsuite/tests/annotations/should_compile/th/annth.hs2
-rw-r--r--testsuite/tests/annotations/should_run/all.T1
-rw-r--r--testsuite/tests/cabal/cabal04/Makefile2
-rw-r--r--testsuite/tests/cabal/cabal04/all.T2
-rw-r--r--testsuite/tests/ghc-e/should_fail/all.T2
-rw-r--r--testsuite/tests/ghc-e/should_run/all.T2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/all.T1
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break022/all.T1
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break023/all.T1
-rwxr-xr-xtestsuite/tests/ghci/scripts/all.T2
-rw-r--r--testsuite/tests/ghci/should_fail/all.T2
-rw-r--r--testsuite/tests/ghci/should_run/all.T2
-rw-r--r--testsuite/tests/layout/all.T3
-rw-r--r--testsuite/tests/overloadedrecflds/ghci/all.T2
-rw-r--r--testsuite/tests/partial-sigs/should_compile/all.T4
-rw-r--r--testsuite/tests/partial-sigs/should_fail/all.T6
-rw-r--r--testsuite/tests/plugins/annotation-plugin/Makefile2
-rw-r--r--testsuite/tests/plugins/rule-defining-plugin/Makefile2
-rw-r--r--testsuite/tests/plugins/simple-plugin/Makefile2
-rw-r--r--testsuite/tests/profiling/should_run/ioprof.prof.sample62
-rw-r--r--testsuite/tests/profiling/should_run/ioprof.stderr2
-rw-r--r--testsuite/tests/quasiquotation/qq007/Makefile2
-rw-r--r--testsuite/tests/quasiquotation/qq007/test.T2
-rw-r--r--testsuite/tests/quasiquotation/qq008/Makefile2
-rw-r--r--testsuite/tests/quasiquotation/qq008/test.T2
-rw-r--r--testsuite/tests/quasiquotation/qq009/Makefile2
-rw-r--r--testsuite/tests/quasiquotation/qq009/test.T2
-rw-r--r--testsuite/tests/runghc/all.T3
-rw-r--r--testsuite/tests/th/Makefile2
-rw-r--r--testsuite/tests/th/T2014/all.T2
-rw-r--r--testsuite/tests/th/T4255.hs5
-rw-r--r--testsuite/tests/th/T4255.stderr2
-rw-r--r--testsuite/tests/th/TH_import_loop/TH_import_loop.T2
-rw-r--r--testsuite/tests/th/all.T14
40 files changed, 78 insertions, 95 deletions
diff --git a/testsuite/config/ghc b/testsuite/config/ghc
index 55a6a734df..fdb7250c10 100644
--- a/testsuite/config/ghc
+++ b/testsuite/config/ghc
@@ -179,7 +179,6 @@ def get_compiler_info():
if re.match(".*_p(_.*|$)", rtsInfoDict["RTS way"]):
config.compiler_profiled = True
- config.run_ways = [x for x in config.run_ways if x != 'ghci']
else:
config.compiler_profiled = False
@@ -204,6 +203,11 @@ def get_compiler_info():
config.ghci_way_flags = "-dynamic"
config.ghc_th_way = "dyn"
config.ghc_plugin_way = "dyn"
+ elif config.compiler_profiled:
+ config.ghc_th_way_flags = "-prof"
+ config.ghci_way_flags = "-prof"
+ config.ghc_th_way = "prof"
+ config.ghc_plugin_way = "prof"
else:
config.ghc_th_way_flags = "-static"
config.ghci_way_flags = "-static"
diff --git a/testsuite/mk/boilerplate.mk b/testsuite/mk/boilerplate.mk
index 055c85659a..30398790d0 100644
--- a/testsuite/mk/boilerplate.mk
+++ b/testsuite/mk/boilerplate.mk
@@ -250,6 +250,10 @@ ifeq "$(GhcDynamic)" "YES"
ghcThWayFlags = -dynamic
ghciWayFlags = -dynamic
ghcPluginWayFlags = -dynamic
+else ifeq "$(GhcProfiled)" "YES"
+ghcThWayFlags = -prof
+ghciWayFlags = -prof
+ghcPluginWayFlags = -prof
else
ghcThWayFlags = -static
ghciWayFlags = -static
diff --git a/testsuite/mk/ghc-config.hs b/testsuite/mk/ghc-config.hs
index c5ad5ff3b7..4ca3d3085c 100644
--- a/testsuite/mk/ghc-config.hs
+++ b/testsuite/mk/ghc-config.hs
@@ -25,6 +25,7 @@ main = do
getGhcFieldOrFail fields "GhcRTSWays" "RTS ways"
getGhcFieldOrDefault fields "GhcDynamicByDefault" "Dynamic by default" "NO"
getGhcFieldOrDefault fields "GhcDynamic" "GHC Dynamic" "NO"
+ getGhcFieldOrDefault fields "GhcProfiled" "GHC Profiled" "NO"
getGhcFieldProgWithDefault fields "AR" "ar command" "ar"
getGhcFieldProgWithDefault fields "LLC" "LLVM llc command" "llc"
diff --git a/testsuite/tests/annotations/should_compile/all.T b/testsuite/tests/annotations/should_compile/all.T
index 1c6690b2b8..57efc2634c 100644
--- a/testsuite/tests/annotations/should_compile/all.T
+++ b/testsuite/tests/annotations/should_compile/all.T
@@ -1,6 +1,3 @@
-
-setTestOpts(when(compiler_profiled(), skip))
-
# Annotations, like Template Haskell, require runtime evaluation. In
# order for this to work with profiling, we would have to build the
# program twice and use -osuf p_o (see the TH_splitE5_prof test). For
diff --git a/testsuite/tests/annotations/should_compile/th/Makefile b/testsuite/tests/annotations/should_compile/th/Makefile
index 4159eeeda1..b10fc725db 100644
--- a/testsuite/tests/annotations/should_compile/th/Makefile
+++ b/testsuite/tests/annotations/should_compile/th/Makefile
@@ -5,7 +5,7 @@ include $(TOP)/mk/test.mk
annth_make:
$(MAKE) clean_annth_make
mkdir build_make
- '$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make \
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) -v0 --make \
-odir build_make -hidir build_make -o build_make/annth annth.hs
clean_annth_make:
@@ -14,16 +14,16 @@ clean_annth_make:
annth_compunits:
$(MAKE) clean_annth_compunits
mkdir build_compunits
- '$(TEST_HC)' $(TEST_HC_OPTS) -v0 -dynamic-too \
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) -v0 \
-odir build_compunits -hidir build_compunits \
-c AnnHelper.hs
- '$(TEST_HC)' $(TEST_HC_OPTS) -v0 -dynamic-too \
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) -v0 \
-odir build_compunits -hidir build_compunits \
-c TestModule.hs
- '$(TEST_HC)' $(TEST_HC_OPTS) -v0 -dynamic-too \
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) -v0 \
-odir build_compunits -hidir build_compunits \
-c TestModuleTH.hs
- '$(TEST_HC)' $(TEST_HC_OPTS) -v0 -ibuild_compunits \
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) -v0 -ibuild_compunits \
-odir build_compunits -hidir build_compunits \
-c annth.hs
diff --git a/testsuite/tests/annotations/should_compile/th/all.T b/testsuite/tests/annotations/should_compile/th/all.T
index b44a0d594f..a1681cfe0b 100644
--- a/testsuite/tests/annotations/should_compile/th/all.T
+++ b/testsuite/tests/annotations/should_compile/th/all.T
@@ -1,5 +1,3 @@
-setTestOpts(when(compiler_profiled(), skip))
-
# Annotations and Template Haskell, require runtime evaluation. In
# order for this to work with profiling, we would have to build the
# program twice and use -osuf p_o (see the TH_splitE5_prof test). For
diff --git a/testsuite/tests/annotations/should_compile/th/annth.hs b/testsuite/tests/annotations/should_compile/th/annth.hs
index de5d4d32a8..8cc3a242ff 100644
--- a/testsuite/tests/annotations/should_compile/th/annth.hs
+++ b/testsuite/tests/annotations/should_compile/th/annth.hs
@@ -6,6 +6,7 @@ import Language.Haskell.TH.Syntax
import AnnHelper
import TestModule
import TestModuleTH
+import System.IO
main = do
$(do
@@ -24,3 +25,4 @@ main = do
anns <- reifyAnnotations (AnnLookupName 'TestTypeTH)
runIO $ print (anns :: [String])
[| return () |] )
+ hFlush stdout
diff --git a/testsuite/tests/annotations/should_run/all.T b/testsuite/tests/annotations/should_run/all.T
index db01b2579f..183ff97bcc 100644
--- a/testsuite/tests/annotations/should_run/all.T
+++ b/testsuite/tests/annotations/should_run/all.T
@@ -1,4 +1,3 @@
-setTestOpts(when(compiler_profiled(), skip))
# These tests are very slow due to their use of package GHC
setTestOpts(when(fast(), skip))
diff --git a/testsuite/tests/cabal/cabal04/Makefile b/testsuite/tests/cabal/cabal04/Makefile
index 34845ff642..9aaa25f404 100644
--- a/testsuite/tests/cabal/cabal04/Makefile
+++ b/testsuite/tests/cabal/cabal04/Makefile
@@ -14,7 +14,7 @@ cabal04:
$(MAKE) clean
'$(TEST_HC)' -v0 --make Setup
$(SETUP) clean
- $(SETUP) configure --with-ghc='$(TEST_HC)' --ghc-options='$(filter-out -rtsopts,$(TEST_HC_OPTS))' $(VANILLA) $(PROF) $(DYN)
+ $(SETUP) configure --with-ghc='$(TEST_HC)' --ghc-options='$(filter-out -rtsopts,$(TEST_HC_OPTS))' $(VANILLA) $(PROF) $(DYN) --ghc-options='$(ghcThWayFlags)'
$(SETUP) build 2> err
! grep -v "Creating library file" err
ifneq "$(CLEANUP)" ""
diff --git a/testsuite/tests/cabal/cabal04/all.T b/testsuite/tests/cabal/cabal04/all.T
index 6d9d13de54..53d90145ce 100644
--- a/testsuite/tests/cabal/cabal04/all.T
+++ b/testsuite/tests/cabal/cabal04/all.T
@@ -8,7 +8,7 @@ if config.have_profiling:
else:
prof = '--disable-library-profiling'
-if config.have_shared_libs:
+if not config.compiler_profiled and config.have_shared_libs:
dyn = '--enable-shared'
else:
dyn = '--disable-shared'
diff --git a/testsuite/tests/ghc-e/should_fail/all.T b/testsuite/tests/ghc-e/should_fail/all.T
index d5400bf713..8cb6d9a68b 100644
--- a/testsuite/tests/ghc-e/should_fail/all.T
+++ b/testsuite/tests/ghc-e/should_fail/all.T
@@ -1,5 +1,3 @@
-setTestOpts(when(compiler_profiled(), skip))
-
test('T7962', [exit_code(2), req_interp, ignore_output], run_command,
['$MAKE --no-print-directory -s T7962'])
diff --git a/testsuite/tests/ghc-e/should_run/all.T b/testsuite/tests/ghc-e/should_run/all.T
index 0e6f7f9c17..dcb720723d 100644
--- a/testsuite/tests/ghc-e/should_run/all.T
+++ b/testsuite/tests/ghc-e/should_run/all.T
@@ -1,6 +1,4 @@
-setTestOpts(when(compiler_profiled(), skip))
-
test('ghc-e001', req_interp, run_command, ['$MAKE --no-print-directory -s ghc-e001'])
test('ghc-e002', req_interp, run_command, ['$MAKE --no-print-directory -s ghc-e002'])
test('ghc-e003', req_interp, run_command, ['$MAKE --no-print-directory -s ghc-e003'])
diff --git a/testsuite/tests/ghci.debugger/scripts/all.T b/testsuite/tests/ghci.debugger/scripts/all.T
index f8a054103d..28089a2727 100644
--- a/testsuite/tests/ghci.debugger/scripts/all.T
+++ b/testsuite/tests/ghci.debugger/scripts/all.T
@@ -1,5 +1,4 @@
setTestOpts([extra_run_opts('-ignore-dot-ghci'),
- when(compiler_profiled(), skip),
normalise_slashes])
test('print001', normal, ghci_script, ['print001.script'])
diff --git a/testsuite/tests/ghci.debugger/scripts/break022/all.T b/testsuite/tests/ghci.debugger/scripts/break022/all.T
index 497ad7e417..546a8f45ca 100644
--- a/testsuite/tests/ghci.debugger/scripts/break022/all.T
+++ b/testsuite/tests/ghci.debugger/scripts/break022/all.T
@@ -1,4 +1,3 @@
setTestOpts(extra_run_opts('-ignore-dot-ghci'))
-setTestOpts(when(compiler_profiled(), skip))
test('break022', extra_clean(['A.hs']), ghci_script, ['break022.script'])
diff --git a/testsuite/tests/ghci.debugger/scripts/break023/all.T b/testsuite/tests/ghci.debugger/scripts/break023/all.T
index 22b608e317..ac747d4461 100644
--- a/testsuite/tests/ghci.debugger/scripts/break023/all.T
+++ b/testsuite/tests/ghci.debugger/scripts/break023/all.T
@@ -1,4 +1,3 @@
setTestOpts(extra_run_opts('-ignore-dot-ghci'))
-setTestOpts(when(compiler_profiled(), skip))
test('break023', extra_clean(['A.hs']), ghci_script, ['break023.script'])
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index d58b2dc0aa..283251cf1f 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -1,7 +1,5 @@
# coding=utf8
-setTestOpts(when(compiler_profiled(), skip))
-
test('ghci001', combined_output, ghci_script, ['ghci001.script'])
test('ghci002', combined_output, ghci_script, ['ghci002.script'])
test('ghci003', combined_output, ghci_script, ['ghci003.script'])
diff --git a/testsuite/tests/ghci/should_fail/all.T b/testsuite/tests/ghci/should_fail/all.T
index 188975a4b7..58a396ed86 100644
--- a/testsuite/tests/ghci/should_fail/all.T
+++ b/testsuite/tests/ghci/should_fail/all.T
@@ -1,4 +1,2 @@
-setTestOpts(when(compiler_profiled(), skip))
-
test('T10549', [], ghci_script, ['T10549.script'])
test('T10549a', [], ghci_script, ['T10549a.script'])
diff --git a/testsuite/tests/ghci/should_run/all.T b/testsuite/tests/ghci/should_run/all.T
index cd5b1f2dcf..bcb15380fb 100644
--- a/testsuite/tests/ghci/should_run/all.T
+++ b/testsuite/tests/ghci/should_run/all.T
@@ -1,6 +1,4 @@
-setTestOpts(when(compiler_profiled(), skip))
-
# We only want to run these tests with GHCi
def just_ghci( name, opts ):
opts.only_ways = ['ghci']
diff --git a/testsuite/tests/layout/all.T b/testsuite/tests/layout/all.T
index 0b973dec6a..ddd53ee64f 100644
--- a/testsuite/tests/layout/all.T
+++ b/testsuite/tests/layout/all.T
@@ -31,8 +31,7 @@ test('layout006',
test('layout007',
[req_interp,
- extra_clean(['layout007.hi', 'layout007.o']),
- when(compiler_profiled(), skip)],
+ extra_clean(['layout007.hi', 'layout007.o'])],
run_command,
['$MAKE -s --no-print-directory layout007'])
diff --git a/testsuite/tests/overloadedrecflds/ghci/all.T b/testsuite/tests/overloadedrecflds/ghci/all.T
index 013e34e730..f114c0fdfa 100644
--- a/testsuite/tests/overloadedrecflds/ghci/all.T
+++ b/testsuite/tests/overloadedrecflds/ghci/all.T
@@ -1,3 +1 @@
-setTestOpts(when(compiler_profiled(), skip))
-
test('overloadedrecfldsghci01', combined_output, ghci_script, ['overloadedrecfldsghci01.script'])
diff --git a/testsuite/tests/partial-sigs/should_compile/all.T b/testsuite/tests/partial-sigs/should_compile/all.T
index 9e7b8a75e8..e99a414b13 100644
--- a/testsuite/tests/partial-sigs/should_compile/all.T
+++ b/testsuite/tests/partial-sigs/should_compile/all.T
@@ -48,9 +48,9 @@ test('TypeFamilyInstanceLHS', normal, compile, ['-ddump-types -fno-warn-partial-
test('Uncurry', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('UncurryNamed', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('WarningWildcardInstantiations', normal, compile, ['-ddump-types'])
-test('SplicesUsed', [req_interp, only_compiler_types(['ghc']), when(compiler_profiled(), skip),
+test('SplicesUsed', [req_interp, only_compiler_types(['ghc']),
extra_clean(['Splices.o', 'Splices.hi'])],
- multimod_compile, ['SplicesUsed', ''])
+ multimod_compile, ['SplicesUsed', config.ghc_th_way_flags])
test('TypedSplice', [req_interp, normal], compile, [''])
test('T10403', normal, compile, [''])
test('T10438', normal, compile, [''])
diff --git a/testsuite/tests/partial-sigs/should_fail/all.T b/testsuite/tests/partial-sigs/should_fail/all.T
index bebd8bda86..913b7d813a 100644
--- a/testsuite/tests/partial-sigs/should_fail/all.T
+++ b/testsuite/tests/partial-sigs/should_fail/all.T
@@ -5,11 +5,11 @@ test('ExtraConstraintsWildcardInExpressionSignature', normal, compile_fail, ['']
test('ExtraConstraintsWildcardInPatternSignature', normal, compile_fail, [''])
test('ExtraConstraintsWildcardInPatternSplice', normal, compile_fail, [''])
test('ExtraConstraintsWildcardInTypeSpliceUsed',
- [req_interp, when(compiler_profiled(), skip),
+ [req_interp,
extra_clean(['ExtraConstraintsWildcardInTypeSplice.o', 'ExtraConstraintsWildcardInTypeSplice.hi'])],
- multimod_compile_fail, ['ExtraConstraintsWildcardInTypeSpliceUsed', ''])
+ multimod_compile_fail, ['ExtraConstraintsWildcardInTypeSpliceUsed', config.ghc_th_way_flags])
test('ExtraConstraintsWildcardInTypeSplice2',
- [req_interp, when(compiler_profiled(), skip)],
+ req_interp,
compile_fail, [''])
test('ExtraConstraintsWildcardNotEnabled', normal, compile_fail, [''])
test('ExtraConstraintsWildcardNotLast', normal, compile_fail, [''])
diff --git a/testsuite/tests/plugins/annotation-plugin/Makefile b/testsuite/tests/plugins/annotation-plugin/Makefile
index 7d957d0e95..ad54f75b6f 100644
--- a/testsuite/tests/plugins/annotation-plugin/Makefile
+++ b/testsuite/tests/plugins/annotation-plugin/Makefile
@@ -13,6 +13,6 @@ package.%:
mkdir pkg.$*
"$(TEST_HC)" -outputdir pkg.$* --make -v0 -o pkg.$*/setup Setup.hs
"$(GHC_PKG)" init pkg.$*/local.package.conf
- pkg.$*/setup configure --distdir pkg.$*/dist -v0 $(CABAL_PLUGIN_BUILD) --prefix="$(HERE)/pkg.$*/install" --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=pkg.$*/local.package.conf
+ pkg.$*/setup configure --distdir pkg.$*/dist -v0 $(CABAL_PLUGIN_BUILD) --prefix="$(HERE)/pkg.$*/install" --with-compiler="$(TEST_HC)" $(if $(findstring _p,$(GhcRTSWays)), --enable-library-profiling) --with-hc-pkg="$(GHC_PKG)" --package-db=pkg.$*/local.package.conf
pkg.$*/setup build --distdir pkg.$*/dist -v0
pkg.$*/setup install --distdir pkg.$*/dist -v0
diff --git a/testsuite/tests/plugins/rule-defining-plugin/Makefile b/testsuite/tests/plugins/rule-defining-plugin/Makefile
index 7d957d0e95..a78ba1ddc8 100644
--- a/testsuite/tests/plugins/rule-defining-plugin/Makefile
+++ b/testsuite/tests/plugins/rule-defining-plugin/Makefile
@@ -13,6 +13,6 @@ package.%:
mkdir pkg.$*
"$(TEST_HC)" -outputdir pkg.$* --make -v0 -o pkg.$*/setup Setup.hs
"$(GHC_PKG)" init pkg.$*/local.package.conf
- pkg.$*/setup configure --distdir pkg.$*/dist -v0 $(CABAL_PLUGIN_BUILD) --prefix="$(HERE)/pkg.$*/install" --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=pkg.$*/local.package.conf
+ pkg.$*/setup configure --distdir pkg.$*/dist -v0 $(CABAL_PLUGIN_BUILD) --prefix="$(HERE)/pkg.$*/install" --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=pkg.$*/local.package.conf $(if $(findstring _p,$(GhcRTSWays)), --enable-library-profiling)
pkg.$*/setup build --distdir pkg.$*/dist -v0
pkg.$*/setup install --distdir pkg.$*/dist -v0
diff --git a/testsuite/tests/plugins/simple-plugin/Makefile b/testsuite/tests/plugins/simple-plugin/Makefile
index eb7cc6ab1d..ed51533379 100644
--- a/testsuite/tests/plugins/simple-plugin/Makefile
+++ b/testsuite/tests/plugins/simple-plugin/Makefile
@@ -15,6 +15,6 @@ package.%:
"$(GHC_PKG)" init pkg.$*/local.package.conf
- pkg.$*/setup configure --distdir pkg.$*/dist -v0 $(CABAL_PLUGIN_BUILD) --prefix="$(HERE)/pkg.$*/install" --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=pkg.$*/local.package.conf
+ pkg.$*/setup configure --distdir pkg.$*/dist -v0 $(CABAL_PLUGIN_BUILD) --prefix="$(HERE)/pkg.$*/install" --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=pkg.$*/local.package.conf $(if $(findstring _p,$(GhcRTSWays)), --enable-library-profiling)
pkg.$*/setup build --distdir pkg.$*/dist -v0
pkg.$*/setup install --distdir pkg.$*/dist -v0
diff --git a/testsuite/tests/profiling/should_run/ioprof.prof.sample b/testsuite/tests/profiling/should_run/ioprof.prof.sample
index 5fd43b94d0..98f48fdadc 100644
--- a/testsuite/tests/profiling/should_run/ioprof.prof.sample
+++ b/testsuite/tests/profiling/should_run/ioprof.prof.sample
@@ -1,36 +1,46 @@
- Thu Apr 2 20:30 2015 Time and Allocation Profiling Report (Final)
+ Fri Oct 30 17:14 2015 Time and Allocation Profiling Report (Final)
ioprof +RTS -hc -p -RTS
total time = 0.00 secs (0 ticks @ 1000 us, 1 processor)
- total alloc = 52,224 bytes (excludes profiling overheads)
+ total alloc = 63,680 bytes (excludes profiling overheads)
COST CENTRE MODULE %time %alloc
-MAIN MAIN 0.0 1.4
-CAF GHC.IO.Handle.FD 0.0 66.1
-CAF GHC.IO.Encoding 0.0 6.3
-CAF GHC.Conc.Signal 0.0 1.3
-main Main 0.0 16.7
-errorM.\ Main 0.0 6.9
+CAF GHC.IO.Handle.FD 0.0 54.2
+CAF GHC.IO.Encoding 0.0 5.2
+CAF GHC.Exception 0.0 1.2
+CAF GHC.Conc.Signal 0.0 1.0
+main Main 0.0 13.6
+errorM.\ Main 0.0 19.8
+CAF Main 0.0 2.6
- individual inherited
-COST CENTRE MODULE no. entries %time %alloc %time %alloc
+ individual inherited
+COST CENTRE MODULE no. entries %time %alloc %time %alloc
-MAIN MAIN 98 0 0.0 1.4 0.0 100.0
- main Main 197 0 0.0 16.5 0.0 16.5
- CAF Main 195 0 0.0 0.0 0.0 7.5
- main Main 196 1 0.0 0.2 0.0 7.5
- runM Main 198 1 0.0 0.3 0.0 7.3
- bar Main 199 1 0.0 0.0 0.0 7.0
- >>= Main 200 1 0.0 0.0 0.0 6.9
- >>=.\ Main 201 1 0.0 0.0 0.0 6.9
- foo Main 202 1 0.0 0.0 0.0 6.9
- errorM Main 203 1 0.0 0.0 0.0 6.9
- errorM.\ Main 204 1 0.0 6.9 0.0 6.9
- CAF GHC.Conc.Signal 177 0 0.0 1.3 0.0 1.3
- CAF GHC.Conc.Sync 176 0 0.0 0.4 0.0 0.4
- CAF GHC.IO.Encoding 161 0 0.0 6.3 0.0 6.3
- CAF GHC.IO.Encoding.Iconv 159 0 0.0 0.4 0.0 0.4
- CAF GHC.IO.Handle.FD 150 0 0.0 66.1 0.0 66.1
+MAIN MAIN 102 0 0.0 1.0 0.0 100.0
+ main Main 205 0 0.0 13.5 0.0 13.5
+ CAF Main 203 0 0.0 2.6 0.0 23.2
+ fmap Main 212 1 0.0 0.0 0.0 0.0
+ <*> Main 208 1 0.0 0.0 0.0 0.0
+ main Main 204 1 0.0 0.2 0.0 20.6
+ runM Main 206 1 0.0 0.3 0.0 20.4
+ bar Main 207 1 0.0 0.2 0.0 20.1
+ foo Main 216 1 0.0 0.0 0.0 0.0
+ errorM Main 217 1 0.0 0.0 0.0 0.0
+ fmap Main 213 0 0.0 0.0 0.0 0.0
+ >>= Main 214 1 0.0 0.0 0.0 0.0
+ <*> Main 209 0 0.0 0.0 0.0 19.8
+ >>= Main 210 1 0.0 0.0 0.0 19.8
+ >>=.\ Main 211 2 0.0 0.0 0.0 19.8
+ foo Main 218 0 0.0 0.0 0.0 19.8
+ errorM Main 219 0 0.0 0.0 0.0 19.8
+ errorM.\ Main 220 1 0.0 19.8 0.0 19.8
+ fmap Main 215 0 0.0 0.0 0.0 0.0
+ CAF GHC.Conc.Signal 197 0 0.0 1.0 0.0 1.0
+ CAF GHC.Conc.Sync 196 0 0.0 0.4 0.0 0.4
+ CAF GHC.Exception 194 0 0.0 1.2 0.0 1.2
+ CAF GHC.IO.Encoding 187 0 0.0 5.2 0.0 5.2
+ CAF GHC.IO.Encoding.Iconv 185 0 0.0 0.4 0.0 0.4
+ CAF GHC.IO.Handle.FD 177 0 0.0 54.2 0.0 54.2
diff --git a/testsuite/tests/profiling/should_run/ioprof.stderr b/testsuite/tests/profiling/should_run/ioprof.stderr
index 7d8fe35da8..3910245347 100644
--- a/testsuite/tests/profiling/should_run/ioprof.stderr
+++ b/testsuite/tests/profiling/should_run/ioprof.stderr
@@ -1 +1,3 @@
ioprof: a
+CallStack:
+ error, called at ioprof.hs:23:22 in main:Main
diff --git a/testsuite/tests/quasiquotation/qq007/Makefile b/testsuite/tests/quasiquotation/qq007/Makefile
index e31a732a26..79eb3b9085 100644
--- a/testsuite/tests/quasiquotation/qq007/Makefile
+++ b/testsuite/tests/quasiquotation/qq007/Makefile
@@ -7,6 +7,6 @@ TH_QQ:
ifeq "$(GhcDynamic)" "YES"
'$(TEST_HC)' $(TEST_HC_OPTS) -c QQ.hs -dynamic -osuf dyn_o -hisuf dyn_hi
else
- '$(TEST_HC)' $(TEST_HC_OPTS) -c QQ.hs
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) -c QQ.hs
endif
diff --git a/testsuite/tests/quasiquotation/qq007/test.T b/testsuite/tests/quasiquotation/qq007/test.T
index 0b4448cdc0..4d6767d3f8 100644
--- a/testsuite/tests/quasiquotation/qq007/test.T
+++ b/testsuite/tests/quasiquotation/qq007/test.T
@@ -4,4 +4,4 @@ test('qq007',
pre_cmd('$MAKE -s --no-print-directory TH_QQ'),
],
multimod_compile,
- ['Test', '-v0'])
+ ['Test', '-v0 ' + config.ghc_th_way_flags])
diff --git a/testsuite/tests/quasiquotation/qq008/Makefile b/testsuite/tests/quasiquotation/qq008/Makefile
index e31a732a26..79eb3b9085 100644
--- a/testsuite/tests/quasiquotation/qq008/Makefile
+++ b/testsuite/tests/quasiquotation/qq008/Makefile
@@ -7,6 +7,6 @@ TH_QQ:
ifeq "$(GhcDynamic)" "YES"
'$(TEST_HC)' $(TEST_HC_OPTS) -c QQ.hs -dynamic -osuf dyn_o -hisuf dyn_hi
else
- '$(TEST_HC)' $(TEST_HC_OPTS) -c QQ.hs
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) -c QQ.hs
endif
diff --git a/testsuite/tests/quasiquotation/qq008/test.T b/testsuite/tests/quasiquotation/qq008/test.T
index 8cac1a9f0a..cb1feae7da 100644
--- a/testsuite/tests/quasiquotation/qq008/test.T
+++ b/testsuite/tests/quasiquotation/qq008/test.T
@@ -4,4 +4,4 @@ test('qq008',
pre_cmd('$MAKE -s --no-print-directory TH_QQ'),
],
multimod_compile,
- ['Test', '-v0'])
+ ['Test', '-v0 ' + config.ghc_th_way_flags])
diff --git a/testsuite/tests/quasiquotation/qq009/Makefile b/testsuite/tests/quasiquotation/qq009/Makefile
index 0fa91dbf9a..f3fb673593 100644
--- a/testsuite/tests/quasiquotation/qq009/Makefile
+++ b/testsuite/tests/quasiquotation/qq009/Makefile
@@ -7,5 +7,5 @@ TH_QQ:
ifeq "$(GhcDynamic)" "YES"
'$(TEST_HC)' $(TEST_HC_OPTS) -c QQ.hs -dynamic -osuf dyn_o -hisuf dyn_hi
else
- '$(TEST_HC)' $(TEST_HC_OPTS) -c QQ.hs
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) -c QQ.hs
endif
diff --git a/testsuite/tests/quasiquotation/qq009/test.T b/testsuite/tests/quasiquotation/qq009/test.T
index 10b939a3bd..7ad1ebef49 100644
--- a/testsuite/tests/quasiquotation/qq009/test.T
+++ b/testsuite/tests/quasiquotation/qq009/test.T
@@ -4,4 +4,4 @@ test('qq009',
pre_cmd('$MAKE -s --no-print-directory TH_QQ'),
],
multimod_compile,
- ['Test', '-v0'])
+ ['Test', '-v0 ' + config.ghc_th_way_flags])
diff --git a/testsuite/tests/runghc/all.T b/testsuite/tests/runghc/all.T
index d268f2eb52..3ffaa20cbc 100644
--- a/testsuite/tests/runghc/all.T
+++ b/testsuite/tests/runghc/all.T
@@ -1,6 +1,3 @@
-
-setTestOpts(when(compiler_profiled(), skip))
-
test('T7859', req_interp, run_command,
['$MAKE --no-print-directory -s T7859'])
diff --git a/testsuite/tests/th/Makefile b/testsuite/tests/th/Makefile
index d219e80aa8..5d2be1eb34 100644
--- a/testsuite/tests/th/Makefile
+++ b/testsuite/tests/th/Makefile
@@ -16,7 +16,7 @@ HC_OPTS = -XTemplateHaskell -package template-haskell
TH_spliceE5_prof::
$(RM) TH_spliceE5_prof*.o TH_spliceE5_prof*.hi TH_spliceE5_prof*.p.o
- '$(TEST_HC)' $(TEST_HC_OPTS) $(HC_OPTS) --make -v0 TH_spliceE5_prof.hs -c
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(HC_OPTS) $(ghcThWayFlags) --make -v0 TH_spliceE5_prof.hs -c
'$(TEST_HC)' $(TEST_HC_OPTS) $(HC_OPTS) --make -v0 TH_spliceE5_prof.hs -prof -auto-all -osuf p.o -o $@
./$@
diff --git a/testsuite/tests/th/T2014/all.T b/testsuite/tests/th/T2014/all.T
index 77709c23c5..5dd92919a6 100644
--- a/testsuite/tests/th/T2014/all.T
+++ b/testsuite/tests/th/T2014/all.T
@@ -1,5 +1,3 @@
-setTestOpts(when(compiler_profiled(), skip))
-
test('T2014',
[req_interp,
extra_clean(['A.hi-boot','A.hi','A.o','A.o-boot',
diff --git a/testsuite/tests/th/T4255.hs b/testsuite/tests/th/T4255.hs
deleted file mode 100644
index 8509f0ece9..0000000000
--- a/testsuite/tests/th/T4255.hs
+++ /dev/null
@@ -1,5 +0,0 @@
-
-{-# LANGUAGE TemplateHaskell #-}
-module T4255 where
-
-f x = $([| x |])
diff --git a/testsuite/tests/th/T4255.stderr b/testsuite/tests/th/T4255.stderr
deleted file mode 100644
index e2c4f2f055..0000000000
--- a/testsuite/tests/th/T4255.stderr
+++ /dev/null
@@ -1,2 +0,0 @@
-ghc: T4255.hs:2:14-28: You can't use Template Haskell with a profiled compiler
-Usage: For basic information, try the `--help' option.
diff --git a/testsuite/tests/th/TH_import_loop/TH_import_loop.T b/testsuite/tests/th/TH_import_loop/TH_import_loop.T
index 8a4a180c28..770c75c0c8 100644
--- a/testsuite/tests/th/TH_import_loop/TH_import_loop.T
+++ b/testsuite/tests/th/TH_import_loop/TH_import_loop.T
@@ -1,6 +1,4 @@
-setTestOpts(when(compiler_profiled(), skip))
-
test('TH_import_loop',
[extra_clean(['ModuleA.o-boot', 'ModuleA.hi-boot',
'ModuleC.o', 'ModuleC.hi']),
diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T
index 3d08f365fa..2a040f295c 100644
--- a/testsuite/tests/th/all.T
+++ b/testsuite/tests/th/all.T
@@ -4,10 +4,6 @@
# and no splices, consider adding it to the quotes/ directory instead
# of the th/ directory; this way, we can test it on the stage 1 compiler too!
-# This test needs to come before the setTestOpts calls below, as we want
-# to run it if compiler_profiled.
-test('T4255', unless(compiler_profiled(), skip), compile_fail, ['-v0'])
-
def f(name, opts):
opts.extra_hc_opts = '-XTemplateHaskell -package template-haskell'
if (ghc_with_interpreter == 0):
@@ -15,7 +11,6 @@ def f(name, opts):
setTestOpts(f)
setTestOpts(only_ways(['normal','ghci']))
-setTestOpts(when(compiler_profiled(), skip))
test('TH_mkName', normal, compile, ['-v0'])
test('TH_1tuple', normal, compile_fail, ['-v0'])
@@ -130,7 +125,7 @@ test('TH_linePragma', normal, compile_fail, ['-v0'])
test('T1830_3',
extra_clean(['T1830_3a.o','T1830_3a.hi']),
multimod_compile_and_run,
- ['T1830_3', '-v0'])
+ ['T1830_3', '-v0 ' + config.ghc_th_way_flags])
test('T2700', normal, compile, ['-v0'])
test('T2817', normal, compile, ['-v0'])
test('T2713', normal, compile_fail, ['-v0'])
@@ -320,7 +315,8 @@ test('TH_StaticPointers02',
compile_fail, [''])
test('T8759', normal, compile_fail, ['-v0'])
test('T7021',
- extra_clean(['T7021a.hi', 'T7021a.o']), multimod_compile, ['T7021','-v0'])
+ extra_clean(['T7021a.hi', 'T7021a.o']), multimod_compile,
+ ['T7021','-v0 ' + config.ghc_th_way_flags])
test('T8807', normal, compile, ['-v0'])
test('T8884', normal, compile, ['-v0'])
test('T8954', normal, compile, ['-v0'])
@@ -348,7 +344,7 @@ test('T10047', normal, ghci_script, ['T10047.script'])
test('T10019', normal, ghci_script, ['T10019.script'])
test('T10267', extra_clean(['T10267a.hi', 'T10267a.o']),
multimod_compile_fail,
- ['T10267', '-dsuppress-uniques -v0'])
+ ['T10267', '-dsuppress-uniques -v0 ' + config.ghc_th_way_flags])
test('T10279', normal, compile_fail, ['-v0'])
test('T10306', normal, compile, ['-v0'])
test('T10596', normal, compile, ['-v0'])
@@ -357,7 +353,7 @@ test('T10638', normal, compile_fail, ['-v0'])
test('T10704',
extra_clean(['T10704a.o','T10704a.hi']),
multimod_compile_and_run,
- ['T10704', '-v0'])
+ ['T10704', '-v0 ' + config.ghc_th_way_flags])
test('T6018th', normal, compile_fail, ['-v0'])
test('TH_namePackage', normal, compile_and_run, ['-v0'])
test('TH_nameSpace', normal, compile_and_run, ['-v0'])