summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2016-06-18 23:28:26 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2016-06-20 16:22:07 +0200
commit135fc86c54626e8fc843eca0a437bee878315949 (patch)
tree9fb6d259041aa56f31432e766e48ed7f8961ce4e /testsuite
parent82f7f1820a175e7e07cbac0ab6d5a9ecddc8acc0 (diff)
downloadhaskell-135fc86c54626e8fc843eca0a437bee878315949.tar.gz
Testsuite: remove `-Wno-warn-tabs` from default flags
This allows the removal of the override_flags stuff in testlib.py.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/driver/testlib.py49
-rw-r--r--testsuite/mk/test.mk8
-rw-r--r--testsuite/tests/deSugar/should_compile/all.T4
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print020.script2
-rwxr-xr-xtestsuite/tests/ghci/scripts/all.T5
-rw-r--r--testsuite/tests/ghci/scripts/ghci024.stdout1
-rw-r--r--testsuite/tests/module/all.T2
-rw-r--r--testsuite/tests/rename/should_compile/timing002.hs1
-rw-r--r--testsuite/tests/warnings/should_compile/all.T5
9 files changed, 20 insertions, 57 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index eaeb315719..c97ff8a147 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -1006,8 +1006,8 @@ def run_command( name, way, cmd ):
# -----------------------------------------------------------------------------
# GHCi tests
-def ghci_script( name, way, script, override_flags = None ):
- flags = ' '.join(get_compiler_flags(override_flags))
+def ghci_script( name, way, script):
+ flags = ' '.join(get_compiler_flags())
way_flags = ' '.join(config.way_flags(name)[way])
@@ -1022,32 +1022,6 @@ def ghci_script( name, way, script, override_flags = None ):
# -----------------------------------------------------------------------------
# Compile-only tests
-def compile_override_default_flags(overrides):
- def apply(name, way, extra_opts):
- return do_compile(name, way, 0, '', [], extra_opts, overrides)
-
- return apply
-
-def compile_fail_override_default_flags(overrides):
- def apply(name, way, extra_opts):
- return do_compile(name, way, 1, '', [], extra_opts, overrides)
-
- return apply
-
-def compile_without_flag(flag):
- def apply(name, way, extra_opts):
- overrides = [f for f in getTestOpts().compiler_always_flags if f != flag]
- return compile_override_default_flags(overrides)(name, way, extra_opts)
-
- return apply
-
-def compile_fail_without_flag(flag):
- def apply(name, way, extra_opts):
- overrides = [f for f in getTestOpts.compiler_always_flags if f != flag]
- return compile_fail_override_default_flags(overrides)(name, way, extra_opts)
-
- return apply
-
def compile( name, way, extra_hc_opts ):
return do_compile( name, way, 0, '', [], extra_hc_opts )
@@ -1066,7 +1040,7 @@ def multi_compile( name, way, top_mod, extra_mods, extra_hc_opts ):
def multi_compile_fail( name, way, top_mod, extra_mods, extra_hc_opts ):
return do_compile( name, way, 1, top_mod, extra_mods, extra_hc_opts)
-def do_compile( name, way, should_fail, top_mod, extra_mods, extra_hc_opts, override_flags = None ):
+def do_compile(name, way, should_fail, top_mod, extra_mods, extra_hc_opts):
# print 'Compile only, extra args = ', extra_hc_opts
result = extras_build( way, extra_mods, extra_hc_opts )
@@ -1074,7 +1048,7 @@ def do_compile( name, way, should_fail, top_mod, extra_mods, extra_hc_opts, over
return result
extra_hc_opts = result['hc_opts']
- result = simple_build(name, way, extra_hc_opts, should_fail, top_mod, 0, 1, override_flags)
+ result = simple_build(name, way, extra_hc_opts, should_fail, top_mod, 0, 1)
if badResult(result):
return result
@@ -1222,7 +1196,7 @@ def extras_build( way, extra_mods, extra_hc_opts ):
return {'passFail' : 'pass', 'hc_opts' : extra_hc_opts}
-def simple_build(name, way, extra_hc_opts, should_fail, top_mod, link, addsuf, override_flags=None):
+def simple_build(name, way, extra_hc_opts, should_fail, top_mod, link, addsuf):
opts = getTestOpts()
errname = add_suffix(name, 'comp.stderr')
@@ -1262,8 +1236,7 @@ def simple_build(name, way, extra_hc_opts, should_fail, top_mod, link, addsuf, o
else:
cmd_prefix = getTestOpts().compile_cmd_prefix + ' '
- flags = ' '.join(get_compiler_flags(override_flags) +
- config.way_flags(name)[way])
+ flags = ' '.join(get_compiler_flags() + config.way_flags(name)[way])
cmd = ('cd "{opts.testdir}" && {cmd_prefix} '
'{{compiler}} {to_do} {srcname} {flags} {extra_hc_opts} '
@@ -1437,8 +1410,7 @@ def interpreter_run( name, way, extra_hc_opts, compile_only, top_mod ):
if os.path.exists(stdin_file):
os.system('cat "{0}" >> "{1}"'.format(stdin_file, qscriptname))
- flags = ' '.join(get_compiler_flags() +
- config.way_flags(name)[way])
+ flags = ' '.join(get_compiler_flags() + config.way_flags(name)[way])
if getTestOpts().combined_output:
redirection = ' > {0} 2>&1'.format(outname)
@@ -1505,13 +1477,10 @@ def split_file(in_fn, delimiter, out1_fn, out2_fn):
# -----------------------------------------------------------------------------
# Utils
-def get_compiler_flags(override_flags=None):
+def get_compiler_flags():
opts = getTestOpts()
- if override_flags is not None:
- flags = copy.copy(override_flags)
- else:
- flags = copy.copy(opts.compiler_always_flags)
+ flags = copy.copy(opts.compiler_always_flags)
flags.append(opts.extra_hc_opts)
diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk
index 2586e29ba7..75944eb27b 100644
--- a/testsuite/mk/test.mk
+++ b/testsuite/mk/test.mk
@@ -38,14 +38,6 @@ TEST_HC_OPTS = -dcore-lint -dcmm-lint -dno-debug-output -no-user-$(GhcPackageDbF
TEST_HC_OPTS_INTERACTIVE = $(TEST_HC_OPTS) --interactive -v0 -ignore-dot-ghci
-# The warning suppression flag below is a temporary kludge. While working with
-# tests that contain tabs, please de-tab them so this flag can be eventually
-# removed. See
-# http://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
-# for details
-#
-TEST_HC_OPTS += -fno-warn-tabs
-
ifeq "$(MinGhcVersion711)" "YES"
# Don't warn about missing specialisations. They can only occur with `-O`, but
# we want tests to produce the same output for all test ways.
diff --git a/testsuite/tests/deSugar/should_compile/all.T b/testsuite/tests/deSugar/should_compile/all.T
index b1aa6ab70f..2252aa8683 100644
--- a/testsuite/tests/deSugar/should_compile/all.T
+++ b/testsuite/tests/deSugar/should_compile/all.T
@@ -59,9 +59,9 @@ test('ds052', normal, compile, [''])
test('ds053', normal, compile, [''])
test('ds054', normal, compile, [''])
test('ds055', normal, compile, [''])
-test('ds056', normal, compile, ['-Wall -fno-warn-tabs'])
+test('ds056', normal, compile, ['-Wall'])
test('ds057', normal, compile, [''])
-test('ds058', normal, compile, ['-W -fno-warn-tabs'])
+test('ds058', normal, compile, ['-W'])
test('ds059', normal, compile, ['-W'])
test('ds062', normal, compile, [''])
test('ds063', normal, compile, [''])
diff --git a/testsuite/tests/ghci.debugger/scripts/print020.script b/testsuite/tests/ghci.debugger/scripts/print020.script
index 026bb4d630..68088cf163 100644
--- a/testsuite/tests/ghci.debugger/scripts/print020.script
+++ b/testsuite/tests/ghci.debugger/scripts/print020.script
@@ -1,4 +1,4 @@
-:set -fno-warn-overlapping-patterns
+:set -fno-warn-overlapping-patterns -Wno-tabs
:l HappyTest.hs
:break lexer
main
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index ace7e62174..dfedb39ea7 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -92,8 +92,7 @@ test('ghci056',
],
ghci_script, ['ghci056.script'])
-test('ghci057', extra_hc_opts('-fwarn-tabs'), ghci_script, ['ghci057.script'])
-
+test('ghci057', normal, ghci_script, ['ghci057.script'])
test('ghci060', normal, ghci_script, ['ghci060.script'])
test('ghci061', normal, ghci_script, ['ghci061.script'])
@@ -203,7 +202,7 @@ 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_hc_opts('-fwarn-tabs'), ghci_script, ['T9293.script'])
+test('T9293', normal, ghci_script, ['T9293.script'])
test('T9762',
[ unless(have_dynamic(),skip)
, pre_cmd('$MAKE -s --no-print-directory T9762_prep')
diff --git a/testsuite/tests/ghci/scripts/ghci024.stdout b/testsuite/tests/ghci/scripts/ghci024.stdout
index 2870d4c590..4bbb556536 100644
--- a/testsuite/tests/ghci/scripts/ghci024.stdout
+++ b/testsuite/tests/ghci/scripts/ghci024.stdout
@@ -9,7 +9,6 @@ other dynamic, non-language, flag settings:
-fimplicit-import-qualified
-fshow-warning-groups
warning settings:
- -Wno-tabs
~~~~~~~~~~ Testing :set -a
options currently set: none.
base language is: Haskell2010
diff --git a/testsuite/tests/module/all.T b/testsuite/tests/module/all.T
index ca81c5e9e8..89bdcc00e0 100644
--- a/testsuite/tests/module/all.T
+++ b/testsuite/tests/module/all.T
@@ -309,7 +309,7 @@ test('mod170', extra_clean(['Mod170_A.hi', 'Mod170_A.o']),
test('mod171', extra_clean(['Mod171_A.hi', 'Mod171_A.o', 'Mod171_B.hi', 'Mod171_B.o']),
- multimod_compile, ['mod171', '-v0 -Wall -fno-warn-tabs'])
+ multimod_compile, ['mod171', '-v0 -Wall'])
test('mod172', extra_clean(['Mod172_B.hi', 'Mod172_B.o', 'Mod172_C.hi', 'Mod172_C.o']),
diff --git a/testsuite/tests/rename/should_compile/timing002.hs b/testsuite/tests/rename/should_compile/timing002.hs
index f81b026a67..c161e74687 100644
--- a/testsuite/tests/rename/should_compile/timing002.hs
+++ b/testsuite/tests/rename/should_compile/timing002.hs
@@ -1,3 +1,4 @@
+{-# OPTIONS_GHC -Wno-tabs #-}
-- !!! 500 defns chained together with "where"s
module Main(main) where
diff --git a/testsuite/tests/warnings/should_compile/all.T b/testsuite/tests/warnings/should_compile/all.T
index 3631202187..d2c8c1a3bd 100644
--- a/testsuite/tests/warnings/should_compile/all.T
+++ b/testsuite/tests/warnings/should_compile/all.T
@@ -3,7 +3,10 @@ test('T2526', normal, compile, ['-fwarn-missing-signatures -fwarn-missing-export
test('T9178', extra_clean(['T9178.o', 'T9178DataType.o',
'T9178.hi', 'T9178DataType.hi']),
multimod_compile, ['T9178', '-Wall'])
-test('T9230', normal, compile_without_flag('-fno-warn-tabs'), [''])
+
+# T9230.hs contains a tab charater. Test that -Wtabs is enabled by default.
+test('T9230', normal, compile, [''])
+
test('T10908', normal, compile, [''])
test('T11077', normal, compile, ['-fwarn-missing-exported-signatures'])
test('T11128', normal, compile, [''])