Commit 322ae32f authored by thomie's avatar thomie

Testsuite: delete remaining only_compiler_types(['ghc']) setups

No point in pretending other compilers can use the GHC testsuite. This
makes the *.T files a bit shorter.
parent 5764ade4
setTestOpts(only_compiler_types(['ghc']))
test('Chan001', reqlib('QuickCheck'), compile_and_run, ['-package QuickCheck'])
test('Chan002', extra_run_opts('100'), compile_and_run, [''])
......
......@@ -96,7 +96,7 @@ test('readwrite002',
test('readwrite003', extra_clean(['readwrite003.txt']), compile_and_run, [''])
test('hGetBuf001',
[only_compiler_types(['ghc']),
[
when(fast(), skip),
expect_fail_if_windows],
compile_and_run, ['-package unix'])
......
......@@ -5,7 +5,6 @@ import subprocess
#
# This file is Python source
#
config.compiler_type = 'ghc'
config.compiler = 'ghc'
config.compiler_always_flags = ghc_compiler_always_flags.split()
......
......@@ -59,9 +59,6 @@ class TestConfig:
self.list_broken = False
# Compiler type (ghc, hugs, nhc, etc.)
self.compiler_type = ''
# Path to the compiler
self.compiler = ''
# and ghc-pkg
......
......@@ -204,21 +204,9 @@ def _extra_ways( name, opts, ways ):
# -----
def omit_compiler_types( compiler_types ):
return lambda name, opts, c=compiler_types: _omit_compiler_types(name, opts, c)
def _omit_compiler_types( name, opts, compiler_types ):
if config.compiler_type in compiler_types:
opts.skip = 1
# -----
def only_compiler_types( compiler_types ):
return lambda name, opts, c=compiler_types: _only_compiler_types(name, opts, c)
def _only_compiler_types( name, opts, compiler_types ):
if config.compiler_type not in compiler_types:
opts.skip = 1
def only_compiler_types( _compiler_types ):
# Don't delete yet. The libraries unix, stm and hpc still call this function.
return lambda _name, _opts: None
# -----
......@@ -377,24 +365,21 @@ def have_profiling( ):
def in_tree_compiler( ):
return config.in_tree_compiler
def compiler_type( compiler ):
return config.compiler_type == compiler
def compiler_lt( compiler, version ):
return config.compiler_type == compiler and \
version_lt(config.compiler_version, version)
assert compiler == 'ghc'
return version_lt(config.compiler_version, version)
def compiler_le( compiler, version ):
return config.compiler_type == compiler and \
version_le(config.compiler_version, version)
assert compiler == 'ghc'
return version_le(config.compiler_version, version)
def compiler_gt( compiler, version ):
return config.compiler_type == compiler and \
version_gt(config.compiler_version, version)
assert compiler == 'ghc'
return version_gt(config.compiler_version, version)
def compiler_ge( compiler, version ):
return config.compiler_type == compiler and \
version_ge(config.compiler_version, version)
assert compiler == 'ghc'
return version_ge(config.compiler_version, version)
def unregisterised( ):
return config.unregisterised
......@@ -2119,11 +2104,11 @@ def qualify( name, suff ):
# Finding the sample output. The filename is of the form
#
# <test>.stdout[-<compiler>][-<version>][-ws-<wordsize>][-<platform>]
# <test>.stdout[-ghc][-<version>][-ws-<wordsize>][-<platform>]
#
# and we pick the most specific version available. The <version> is
# the major version of the compiler (e.g. 6.8.2 would be "6.8"). For
# more fine-grained control use if_compiler_lt().
# more fine-grained control use compiler_lt().
#
def platform_wordsize_qualify( name, suff ):
......@@ -2134,7 +2119,7 @@ def platform_wordsize_qualify( name, suff ):
(1, '-' + config.os),
(0, '')]
for ws in ['-ws-' + config.wordsize, '']
for comp in ['-' + config.compiler_type, '']
for comp in ['-ghc', '']
for vers in ['-' + config.compiler_maj_version, '']]
dir = glob.glob(basepath + '*')
......
setTestOpts(only_compiler_types(['ghc']))
test('arrowapply1', normal, compile, [''])
test('arrowapply2', normal, compile, [''])
test('arrowapply3', normal, compile, [''])
......
setTestOpts(only_compiler_types(['ghc']))
test('arrowfail001',
normal,
compile_fail,
......
setTestOpts(only_compiler_types(['ghc']))
test('arrowrun001', normal, compile_and_run, [''])
test('arrowrun002', when(fast(), skip), compile_and_run, [''])
test('arrowrun003', normal, compile_and_run, [''])
......
setTestOpts(only_compiler_types(['ghc']))
def normaliseDynlibNames(str):
return re.sub('-ghc[0-9.]+\.', '-ghc<VERSION>.', str)
......
setTestOpts(only_compiler_types(['ghc']))
if config.have_vanilla:
vanilla = '--enable-library-vanilla'
else:
......
setTestOpts(only_compiler_types(['ghc']))
if config.have_vanilla:
vanilla = '--enable-library-vanilla'
else:
......
test('cg001', only_compiler_types(['ghc']), compile, [''])
test('cg001', normal, compile, [''])
test('cg002', normal, compile, [''])
test('cg003', only_ways(['optasm']), compile, [''])
test('cg004', normal, compile, [''])
......
......@@ -12,13 +12,13 @@ test('cgrun008', normal, compile_and_run, [''])
test('cgrun009', normal, compile_and_run, [''])
test('cgrun010', normal, compile_and_run, [''])
test('cgrun011', normal, compile_and_run, [''])
test('cgrun012', only_compiler_types(['ghc']), compile_and_run, [''])
test('cgrun012', normal, compile_and_run, [''])
test('cgrun013', normal, compile_and_run, [''])
test('cgrun014', normal, compile_and_run, [''])
test('cgrun015', only_compiler_types(['ghc']), compile_and_run, [''])
test('cgrun015', normal, compile_and_run, [''])
test('cgrun016', exit_code(1), compile_and_run, [''])
test('cgrun017', normal, compile_and_run, [''])
test('cgrun018', only_compiler_types(['ghc']), compile_and_run, [''])
test('cgrun018', normal, compile_and_run, [''])
test('cgrun019', normal, compile_and_run, [''])
test('cgrun020', normal, compile_and_run, [''])
test('cgrun021', normal, compile_and_run, [''])
......@@ -27,12 +27,12 @@ test('cgrun024', normal, compile_and_run, [''])
test('cgrun025',
[reqlib('regex-compat'), extra_run_opts('cg025.hs'), exit_code(1)],
compile_and_run, ['-package regex-compat'])
test('cgrun026', only_compiler_types(['ghc']), compile_and_run, [''])
test('cgrun026', normal, compile_and_run, [''])
test('cgrun027', normal, compile_and_run, [''])
test('cgrun028', normal, compile_and_run, [''])
test('cgrun031', only_compiler_types(['ghc']), compile_and_run, [''])
test('cgrun032', only_compiler_types(['ghc']), compile_and_run, [''])
test('cgrun033', only_compiler_types(['ghc']), compile_and_run, [''])
test('cgrun031', normal, compile_and_run, [''])
test('cgrun032', normal, compile_and_run, [''])
test('cgrun033', normal, compile_and_run, [''])
test('cgrun034', normal, compile_and_run, [''])
test('cgrun035', normal, compile_and_run, [''])
test('cgrun036', normal, compile_and_run, [''])
......
......@@ -123,35 +123,28 @@ test('conc002', normal, compile_and_run, [''])
# Omit GHCi way - it blows up to 0.5G. Something to do with the threaded RTS?
test('conc004', omit_ways(['ghci']), compile_and_run, [''])
test('conc007', [only_compiler_types(['ghc']),
extra_run_opts('+RTS -H128M -RTS')],
compile_and_run, [''])
test('conc008', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc009', [only_compiler_types(['ghc']), exit_code(1)],
compile_and_run, [''])
test('conc010', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc007', extra_run_opts('+RTS -H128M -RTS'), compile_and_run, [''])
test('conc008', normal, compile_and_run, [''])
test('conc009', exit_code(1), compile_and_run, [''])
test('conc010', normal, compile_and_run, [''])
# conc012(ghci) needs a smaller stack, or it takes forever
test('conc012', [only_compiler_types(['ghc']),
extra_run_opts('+RTS -K8m -RTS')],
compile_and_run, [''])
test('conc012', extra_run_opts('+RTS -K8m -RTS'), compile_and_run, [''])
test('conc013', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc014', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc015', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc015a', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc016', [ omit_ways(['threaded2']), # see comment in conc016.hs
only_compiler_types(['ghc']) ], compile_and_run, [''])
test('conc017', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc017a', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc018', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc019', [only_compiler_types(['ghc']),
extra_run_opts('+RTS -K16m -RTS')],
compile_and_run, [''])
test('conc020', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc013', normal, compile_and_run, [''])
test('conc014', normal, compile_and_run, [''])
test('conc015', normal, compile_and_run, [''])
test('conc015a', normal, compile_and_run, [''])
test('conc016', omit_ways(['threaded2']), # see comment in conc016.hs
compile_and_run, [''])
test('conc017', normal, compile_and_run, [''])
test('conc017a', normal, compile_and_run, [''])
test('conc018', normal, compile_and_run, [''])
test('conc019', extra_run_opts('+RTS -K16m -RTS'), compile_and_run, [''])
test('conc020', normal, compile_and_run, [''])
test('conc021', [ omit_ways(['ghci']), exit_code(1) ], compile_and_run, [''])
test('conc022', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc022', normal, compile_and_run, [''])
# On Windows, the non-threaded RTS creates a real OS thread for each
# threadDelay. conc023 creates 5000 concurrent threadDelays, and the
......@@ -164,31 +157,28 @@ else:
conc023_ways = normal
test('conc023', [when(fast(), skip),
only_compiler_types(['ghc']),
reqlib('random'),
conc023_ways], compile_and_run, [''])
test('conc024', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc024', normal, compile_and_run, [''])
test('conc025', normal, compile_and_run, [''])
test('conc026', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc026', normal, compile_and_run, [''])
test('conc028', normal, compile_and_run, [''])
test('conc029', normal, compile_and_run, [''])
test('conc030',
[only_compiler_types(['ghc']), extra_run_opts('+RTS -K4M -RTS')],
compile_and_run, [''])
test('conc030', extra_run_opts('+RTS -K4M -RTS'), compile_and_run, [''])
test('conc031', exit_code(1), compile_and_run, [''])
test('conc032', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc032', normal, compile_and_run, [''])
test('conc033', normal, compile_and_run, [''])
# Omit for GHCi, because it just sits there waiting for you to press ^C
test('conc034', [only_compiler_types(['ghc']),
test('conc034', [
omit_ways(['ghci']),
extra_run_opts('+RTS -C0 -RTS')],
compile_and_run, [''])
test('conc035', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc035', normal, compile_and_run, [''])
# conc036: now skipped entirely. This test attempts to check that
# unsafe foreign calls block other threads, but doing that reliably is
......@@ -211,7 +201,7 @@ test('foreignInterruptible', [when(fast(), skip),
# I don't think we support interrupting Sleep()
# on Windows. --SDM
only_threaded_ways,
only_compiler_types(['ghc'])],
],
compile_and_run, [''])
test('conc037', only_ways(['threaded1','threaded2']), compile_and_run, [''])
......@@ -223,21 +213,19 @@ test('conc038', only_ways(['threaded1','threaded2']), compile_and_run, [''])
test('conc039', omit_ways(['ghci','threaded1','threaded2','profthreaded']), compile_and_run, [''])
# Omit for GHCi, uses foreign export
test('conc040',
[only_compiler_types(['ghc']), exit_code(1), omit_ways(['ghci'])],
compile_and_run, [''])
test('conc040', [exit_code(1), omit_ways(['ghci'])], compile_and_run, [''])
# STM-related tests.
test('conc041', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc042', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc043', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc044', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc045', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc041', normal, compile_and_run, [''])
test('conc042', normal, compile_and_run, [''])
test('conc043', normal, compile_and_run, [''])
test('conc044', normal, compile_and_run, [''])
test('conc045', normal, compile_and_run, [''])
test('conc058', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc058', normal, compile_and_run, [''])
test('conc059',
[only_compiler_types(['ghc']),
[
only_ways(['threaded1','threaded2']),
pre_cmd('$MAKE -s --no-print-directory conc059_setup'),
extra_clean(['conc059_c.o'])],
......
......@@ -39,7 +39,7 @@ test('ds031', normal, compile, [''])
test('ds032', normal, compile, [''])
test('ds033', normal, compile, [''])
test('ds034', normal, compile, [''])
test('ds035', only_compiler_types(['ghc']), compile, [''])
test('ds035', normal, compile, [''])
test('ds036', normal, compile, [''])
test('ds037', normal, compile, [''])
test('ds038', normal, compile, [''])
......@@ -58,7 +58,7 @@ test('ds051', normal, compile, [''])
test('ds052', normal, compile, [''])
test('ds053', normal, compile, [''])
test('ds054', normal, compile, [''])
test('ds055', only_compiler_types(['ghc']), compile, [''])
test('ds055', normal, compile, [''])
test('ds056', normal, compile, ['-Wall -fno-warn-tabs'])
test('ds057', normal, compile, [''])
test('ds058', normal, compile, ['-W -fno-warn-tabs'])
......@@ -78,7 +78,6 @@ test('T4439', normal, compile, [''])
test('T4488', normal, compile, [''])
test('T4870',
[only_ways(['optasm']),
only_compiler_types(['ghc']),
extra_clean(['T4870a.hi', 'T4870a.o'])],
multimod_compile,
['T4870', '-v0'])
......@@ -90,7 +89,6 @@ test('T5252',
test('T5455', normal, compile, [''])
test('T5001',
[only_ways(['optasm']),
only_compiler_types(['ghc']),
extra_clean(['T5001a.hi', 'T5001a.o'])],
multimod_compile,
['T5001', '-v0'])
......
......@@ -19,7 +19,7 @@ test('drvrun013', when(fast(), skip), compile_and_run, [''])
test('drvrun014', when(fast(), skip), compile_and_run, [''])
test('drvrun015', when(fast(), skip), compile_and_run, [''])
test('drvrun016', when(fast(), skip), compile_and_run, ['-funbox-strict-fields'])
test('drvrun017', [when(fast(), skip), only_compiler_types(['ghc'])], compile_and_run, [''])
test('drvrun017', when(fast(), skip), compile_and_run, [''])
test('drvrun018', when(fast(), skip), compile_and_run, [''])
test('drvrun019', normal, compile_and_run, [''])
test('drvrun020', normal, compile_and_run, [''])
......
setTestOpts(only_compiler_types(['ghc']))
test('T9562',
[extra_clean(['A011.hi', 'A011.o']), expect_broken(9562)],
run_command,
......
setTestOpts(only_compiler_types(['ghc']))
test('driver011',
extra_clean(['A011.hi', 'A011.o']),
run_command,
......
test('dynamicToo003',
[extra_clean(['A003.o', 'A003.hi', 'A003.dyn_o', 'A003.dyn_hi']),
only_compiler_types(['ghc']),
unless(have_vanilla(), skip),
unless(have_dynamic(), skip)],
run_command,
......
......@@ -4,7 +4,6 @@ test('dynamicToo001',
'B.o', 'B.hi', 'B.dyn_o', 'B.dyn_hi',
'C.o', 'C.hi', 'C.dyn_o', 'C.dyn_hi',
's', 's.exe', 'd', 'd.exe']),
only_compiler_types(['ghc']),
when(opsys('mingw32'), expect_broken(7665)),
unless(have_vanilla(), skip),
unless(have_dynamic(), skip)],
......
......@@ -3,7 +3,6 @@ test('dynamicToo002',
[extra_clean(['A.o', 'A.hi', 'A.dyn_o', 'A.dyn_hi',
'B.o', 'B.hi', 'B.dyn_o', 'B.dyn_hi',
'C.o', 'C.hi', 'C.dyn_o', 'C.dyn_hi']),
only_compiler_types(['ghc']),
unless(have_vanilla(), skip),
unless(have_dynamic(), skip)],
run_command,
......
test('dynamicToo004',
[only_compiler_types(['ghc']),
expect_broken(7665),
[expect_broken(7665),
unless(have_vanilla(), skip),
unless(have_dynamic(), skip)],
run_command,
......
......@@ -2,16 +2,15 @@
# Missing:
# test('cc002', normal, compile_fail, [''])
test('ccfail001', only_compiler_types(['ghc']), compile_fail, [''])
test('ccfail002', only_compiler_types(['ghc']), compile_fail, [''])
test('ccfail003', only_compiler_types(['ghc']), compile_fail, [''])
test('T3066', only_compiler_types(['ghc']), compile_fail, [''])
test('ccfail001', normal, compile_fail, [''])
test('ccfail002', normal, compile_fail, [''])
test('ccfail003', normal, compile_fail, [''])
test('T3066', normal, compile_fail, [''])
test('ccfail004',
[only_compiler_types(['ghc']),
extra_clean(['Ccfail004A.hi', 'Ccfail004A.o'])],
extra_clean(['Ccfail004A.hi', 'Ccfail004A.o']),
multimod_compile_fail,
['ccfail004', '-v0'])
test('ccfail005', only_compiler_types(['ghc']), compile_fail, [''])
test('ccfail005', normal, compile_fail, [''])
test('ccall_value', normal, compile_fail, [''])
test('capi_value_function', normal, compile_fail, [''])
test('T5664', normal, compile_fail, ['-v0'])
......
......@@ -50,8 +50,7 @@ test('ffi008', [exit_code(1), omit_ways(['ghci'])], compile_and_run, [''])
maybe_skip = normal
opts = ''
if config.platform.startswith('i386-'):
if config.compiler_type == 'ghc' and \
version_ge(config.compiler_version, '6.13'):
if version_ge(config.compiler_version, '6.13'):
opts = '-msse2'
else:
maybe_skip = only_ways(['ghci'])
......
setTestOpts(only_compiler_types(['ghc']))
# setTestOpts(only_ways(['normal']));
# Not only-normal: want optimisation too, to check coercion optimiser
......
setTestOpts(only_compiler_types(['ghc']))
test('GEq1', extra_clean(['GEq1A.hi', 'GEq1A.o']),
multimod_compile_and_run, ['GEq1', ''])
test('GEq2', normal, multimod_compile_and_run, ['GEq2', ''])
\ No newline at end of file
test('GEq2', normal, multimod_compile_and_run, ['GEq2', ''])
setTestOpts(only_compiler_types(['ghc']))
test('GFunctor1', extra_clean(['GFunctor.hi', 'GFunctor.o', 'Main.hi', 'Main.o']),
multimod_compile_and_run, ['Main', ''])
\ No newline at end of file
multimod_compile_and_run, ['Main', ''])
setTestOpts(only_compiler_types(['ghc']))
test('GMap1', extra_clean(['GMap.hi', 'GMap.o', 'Main.hi', 'Main.o']),
multimod_compile_and_run, ['Main', ''])
setTestOpts(only_compiler_types(['ghc']))
test('GShow1', extra_clean(['GShow.hi', 'GShow.o', 'Main.hi', 'Main.o']),
multimod_compile_and_run, ['Main', ''])
\ No newline at end of file
multimod_compile_and_run, ['Main', ''])
setTestOpts(only_compiler_types(['ghc']))
test('GUniplate1', extra_clean(['GUniplate.hi', 'GUniplate.o',
'Main.hi', 'Main.o']),
multimod_compile_and_run, ['Main', ''])
\ No newline at end of file
multimod_compile_and_run, ['Main', ''])
setTestOpts(only_compiler_types(['ghc']))
test('GenCanDoRep0', normal, compile, [''])
test('GenCanDoRep1', normal, compile, [''])
test('GenDerivOutput', normal, compile, ['-dsuppress-uniques'])
......
setTestOpts(only_compiler_types(['ghc']))
def f(name, opts):
if not ('ghci' in config.run_ways):
opts.skip = 1
......
......@@ -8,9 +8,7 @@ test('T10138', ignore_output, run_command,
# '-hpcdir' to a different value for each test. Only the `hpc` way does this
# automatically. This way the tests in this directory can be run concurrently
# (Main.mix might overlap otherwise).
setTestOpts([only_compiler_types(['ghc']),
only_ways(['hpc']),
])
setTestOpts(only_ways(['hpc']))
def T2991(cmd):
# The .mix file for the literate module should have non-zero entries.
......
setTestOpts(only_compiler_types(['ghc']))
# Keep optimised tests, so we test coercion optimisation
setTestOpts(omit_ways(['optasm', 'optllvm', 'hpc']))
......
setTestOpts(only_compiler_types(['ghc']))
setTestOpts(omit_ways(['optasm']))
test('SimpleFail1a', normal, compile_fail, [''])
......
setTestOpts(only_compiler_types(['ghc']))
setTestOpts(omit_ways(['hpc', 'ghci', 'threaded1', 'threaded2']))
test('T2985', normal, compile_and_run, [''])
......
test('layout001',
[extra_clean(['layout001.hi', 'layout001.o']),
only_compiler_types(['ghc'])],
extra_clean(['layout001.hi', 'layout001.o']),
run_command,
['$MAKE -s --no-print-directory layout001'])
test('layout002',
[extra_clean(['layout002.hi', 'layout002.o']),
only_compiler_types(['ghc'])],
extra_clean(['layout002.hi', 'layout002.o']),
run_command,
['$MAKE -s --no-print-directory layout002'])
test('layout003',
[extra_clean(['layout003.hi', 'layout003.o']),
only_compiler_types(['ghc'])],
extra_clean(['layout003.hi', 'layout003.o']),
run_command,
['$MAKE -s --no-print-directory layout003'])
test('layout004',
[extra_clean(['layout004.hi', 'layout004.o']),
only_compiler_types(['ghc'])],
extra_clean(['layout004.hi', 'layout004.o']),
run_command,
['$MAKE -s --no-print-directory layout004'])
test('layout005',
[extra_clean(['layout005.hi', 'layout005.o']),
only_compiler_types(['ghc'])],
extra_clean(['layout005.hi', 'layout005.o']),
run_command,
['$MAKE -s --no-print-directory layout005'])
test('layout006',
[extra_clean(['layout006.hi', 'layout006.o']),
only_compiler_types(['ghc'])],
extra_clean(['layout006.hi', 'layout006.o']),
run_command,
['$MAKE -s --no-print-directory layout006'])
test('layout007',
[req_interp,
extra_clean(['layout007.hi', 'layout007.o']),
only_compiler_types(['ghc']),
when(compiler_profiled(), skip)],
run_command,
['$MAKE -s --no-print-directory layout007'])
test('layout008',
[extra_clean(['layout008.hi', 'layout008.o']),
only_compiler_types(['ghc'])],
extra_clean(['layout008.hi', 'layout008.o']),
run_command,
['$MAKE -s --no-print-directory layout008'])
test('layout009',
[extra_clean(['layout009.hi', 'layout009.o']),
only_compiler_types(['ghc'])],
extra_clean(['layout009.hi', 'layout009.o']),
run_command,