summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@cs.brynmawr.edu>2018-07-14 15:27:48 -0400
committerRichard Eisenberg <rae@cs.brynmawr.edu>2018-07-14 21:27:18 -0400
commit6d55e36f6d4b71402b3a27cd466d237034d3a5b8 (patch)
tree7c60ce2fb29441f6c1aaf18b921332d887d5d9f0
parent15ce9b45515415b0cbe606e9324a7858c9009c0b (diff)
downloadhaskell-6d55e36f6d4b71402b3a27cd466d237034d3a5b8.tar.gz
Disable -fghci-leak-check in DEBUG mode
The DEBUG compiler's GHCi still leaks. This commit suppresses testsuite failures due to this leak. See #15372.
-rw-r--r--testsuite/config/ghc2
-rw-r--r--testsuite/driver/testlib.py3
-rw-r--r--testsuite/tests/ghci/scripts/T9293.stdout4
-rwxr-xr-xtestsuite/tests/ghci/scripts/all.T16
-rw-r--r--testsuite/tests/ghci/scripts/ghci057.stdout4
5 files changed, 17 insertions, 12 deletions
diff --git a/testsuite/config/ghc b/testsuite/config/ghc
index f41f372cb2..a850be90d4 100644
--- a/testsuite/config/ghc
+++ b/testsuite/config/ghc
@@ -80,7 +80,7 @@ config.way_flags = {
'prof_no_auto' : ['-prof', '-static', '-fasm'],
'profasm' : ['-O', '-prof', '-static', '-fprof-auto'],
'profthreaded' : ['-O', '-prof', '-static', '-fprof-auto', '-threaded'],
- 'ghci' : ['--interactive', '-v0', '-ignore-dot-ghci', '-fno-ghci-history', '-fghci-leak-check', '+RTS', '-I0.1', '-RTS'],
+ 'ghci' : ['--interactive', '-v0', '-ignore-dot-ghci', '-fno-ghci-history', '+RTS', '-I0.1', '-RTS'] + (['-fghci-leak-check'] if not config.compiler_debugged else []),
'sanity' : ['-debug'],
'threaded1' : ['-threaded', '-debug'],
'threaded1_ls' : ['-threaded', '-debug'],
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index dac2684131..f7863c3f3f 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -970,8 +970,9 @@ def ghci_script( name, way, script):
# We pass HC and HC_OPTS as environment variables, so that the
# script can invoke the correct compiler by using ':! $HC $HC_OPTS'
- cmd = ('HC={{compiler}} HC_OPTS="{flags}" {{compiler}} {flags} {way_flags}'
+ cmd = ('HC={{compiler}} HC_OPTS="{flags}" {{compiler}} {way_flags} {flags}'
).format(flags=flags, way_flags=way_flags)
+ # NB: put way_flags before flags so that flags in all.T can overrie others
getTestOpts().stdin = script
return simple_run( name, way, cmd, getTestOpts().extra_run_opts )
diff --git a/testsuite/tests/ghci/scripts/T9293.stdout b/testsuite/tests/ghci/scripts/T9293.stdout
index 4fdd3504bc..2e5adc404c 100644
--- a/testsuite/tests/ghci/scripts/T9293.stdout
+++ b/testsuite/tests/ghci/scripts/T9293.stdout
@@ -10,7 +10,6 @@ other dynamic, non-language, flag settings:
-fignore-optim-changes
-fignore-hpc-changes
-fno-ghci-history
- -fghci-leak-check
-fimplicit-import-qualified
-fshow-warning-groups
warning settings:
@@ -30,7 +29,6 @@ other dynamic, non-language, flag settings:
-fignore-optim-changes
-fignore-hpc-changes
-fno-ghci-history
- -fghci-leak-check
-fimplicit-import-qualified
-fshow-warning-groups
warning settings:
@@ -49,7 +47,6 @@ other dynamic, non-language, flag settings:
-fignore-optim-changes
-fignore-hpc-changes
-fno-ghci-history
- -fghci-leak-check
-fimplicit-import-qualified
-fshow-warning-groups
warning settings:
@@ -70,7 +67,6 @@ other dynamic, non-language, flag settings:
-fignore-optim-changes
-fignore-hpc-changes
-fno-ghci-history
- -fghci-leak-check
-fimplicit-import-qualified
-fshow-warning-groups
warning settings:
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index 89545949c6..b054be9c40 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -1,5 +1,12 @@
# coding=utf8
+# Note [Disabling ghci-leak-check]
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# The -fno-ghci-leak-check is because this test prints the current GHC settings
+# and the ghci-leak-check is turned off in DEBUG mode. See #15372. So we need to
+# turn it off in non-DEBUG mode, too, so that one stdout works for both modes.
+# After #15372 is fully fixed, these "extra_hc_opts" should be removed.
+
test('ghci001', combined_output, ghci_script, ['ghci001.script'])
test('ghci002', combined_output, ghci_script, ['ghci002.script'])
test('ghci003', combined_output, ghci_script, ['ghci003.script'])
@@ -91,7 +98,9 @@ test('ghci056',
extra_run_opts('ghci056_c.o')],
ghci_script, ['ghci056.script'])
-test('ghci057', normal, ghci_script, ['ghci057.script'])
+test('ghci057', extra_hc_opts("-fno-ghci-leak-check"), ghci_script, ['ghci057.script'])
+ # See Note [Disabling ghci-leak-check]
+
test('ghci060', normal, ghci_script, ['ghci060.script'])
test('ghci061', normal, ghci_script, ['ghci061.script'])
test('ghci062', [extra_files(['ghci062/', 'ghci062/Test.hs']),
@@ -190,7 +199,10 @@ test('T9181', normal, ghci_script, ['T9181.script'])
test('T9086b', normal, ghci_script, ['T9086b.script'])
test('T9140', combined_output, ghci_script, ['T9140.script'])
test('T9658', normal, ghci_script, ['T9658.script'])
-test('T9293', extra_files(['ghci057.hs']), ghci_script, ['T9293.script'])
+
+test('T9293', [extra_hc_opts('-fno-ghci-leak-check'), extra_files(['ghci057.hs'])], ghci_script, ['T9293.script'])
+ # See Note [Disabling ghci-leak-check]
+
test('T9762',
[ unless(have_dynamic(),skip)
, pre_cmd('$MAKE -s --no-print-directory T9762_prep')
diff --git a/testsuite/tests/ghci/scripts/ghci057.stdout b/testsuite/tests/ghci/scripts/ghci057.stdout
index 4fdd3504bc..2e5adc404c 100644
--- a/testsuite/tests/ghci/scripts/ghci057.stdout
+++ b/testsuite/tests/ghci/scripts/ghci057.stdout
@@ -10,7 +10,6 @@ other dynamic, non-language, flag settings:
-fignore-optim-changes
-fignore-hpc-changes
-fno-ghci-history
- -fghci-leak-check
-fimplicit-import-qualified
-fshow-warning-groups
warning settings:
@@ -30,7 +29,6 @@ other dynamic, non-language, flag settings:
-fignore-optim-changes
-fignore-hpc-changes
-fno-ghci-history
- -fghci-leak-check
-fimplicit-import-qualified
-fshow-warning-groups
warning settings:
@@ -49,7 +47,6 @@ other dynamic, non-language, flag settings:
-fignore-optim-changes
-fignore-hpc-changes
-fno-ghci-history
- -fghci-leak-check
-fimplicit-import-qualified
-fshow-warning-groups
warning settings:
@@ -70,7 +67,6 @@ other dynamic, non-language, flag settings:
-fignore-optim-changes
-fignore-hpc-changes
-fno-ghci-history
- -fghci-leak-check
-fimplicit-import-qualified
-fshow-warning-groups
warning settings: