Commit 5e66a698 authored by thomie's avatar thomie

Testsuite: change some expect_fail tests to expect_broken

Change the following tests from expect_fail to expect_broken: and list
the ticket number:

    * driver/sigof03m/sigof03 (#9252)
    * driver/static001 (#8127)
    * partial-sigs/should_compile/EqualityConstraint (#9478)
    * partial-sigs/should_compile/ExtraNumAMROn (#9478)
    * partial-sigs/should_compile/PatBind2 (#9478)
    * partial-sigs/should_fail/TidyClash2 (#9478)
    * simplCore/should_compile/T8832 (#8832)

The following tests are still marked as expect_fail, but it is not
clearly documented why so:

    * gadt/lazypatok
    * indexed-types/should_fail/SkolemOccursLoop

All other expect_fail tests are only expected to fail on either a
certain platform/os or for a certain way only.

Differential Revision:
parent 6cefeb37
......@@ -84,6 +84,9 @@ def skip( name, opts ):
opts.skip = 1
def expect_fail( name, opts ):
# The compiler, testdriver, OS or platform is missing a certain
# feature, and we don't plan to or can't fix it now or in the
# future.
opts.expect = 'fail';
def reqlib( lib ):
......@@ -149,6 +152,8 @@ def _expect_fail_for( name, opts, ways ):
opts.expect_fail_for = ways
def expect_broken( bug ):
# This test is a expected not to work due to the indicated trac bug
# number.
return lambda name, opts, b=bug: _expect_broken (name, opts, b )
def _expect_broken( name, opts, bug ):
# Windows runs the preprocessor using runInteractiveProcess and can't
# properly run the generated shell script as a result, since it can't
# recognize e.g. a shebang or anything.
when(opsys('mingw32'), expect_fail)],
ghci_script, ['T8602.script'])
......@@ -317,7 +317,7 @@ else:
only_darwin = skip
[only_darwin, expect_fail,
[only_darwin, expect_broken(8127),
extra_clean(['Static001.hi', 'Static001.o', 'liba.a', 'Static001_stub.h', 'Static001_stub.o'])],
['$MAKE -s --no-print-directory static001'])
......@@ -6,6 +6,6 @@ test('sigof03',
# This doesn't work yet, because the instances aren't found the
# right way (they don't go in the EPS, differently from one-shot)
[ clean_cmd('rm -rf tmp_sigof03m'), expect_fail ],
[ clean_cmd('rm -rf tmp_sigof03m'), expect_broken(9252) ],
['$MAKE -s --no-print-directory sigof03m'])
......@@ -46,6 +46,8 @@ test('nbe', normal, compile, [''])
test('while', normal, compile_and_run, [''])
test('rw', normal, compile_fail, [''])
test('lazypat', normal, compile_fail, [''])
# Not marked as expect_broken, because it's not clear whether this test should
# succeed or fail.
test('lazypatok', expect_fail, compile, [''])
test('tc', normal, compile_and_run, [''])
test('arrow', normal, compile, [''])
......@@ -2,7 +2,7 @@
-- It's not clear whether this one should succed or fail,
-- Arguably it should succeed because the type refinement on
-- T1 should make (y::Int). Currently, though, it succeeds
-- T1 should make (y::Int). Currently, though, it fails.
module ShouldFail where
......@@ -13,14 +13,14 @@ test('Either', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures
test('Every', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('EveryNamed', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
# Bug
test('EqualityConstraint', expect_fail, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('EqualityConstraint', expect_broken(9478), compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('ExpressionSig', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('ExpressionSigNamed', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('ExtraConstraints1', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('ExtraConstraints2', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('ExtraConstraints3', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
# Bug
test('ExtraNumAMROn', expect_fail, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('ExtraNumAMROn', expect_broken(9478), compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('ExtraNumAMROff', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('Forall1', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('GenNamed', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
......@@ -34,7 +34,7 @@ test('NamedTyVar', normal, compile, ['-ddump-types -fno-warn-partial-type-signat
test('ParensAroundContext', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('PatBind', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
# Bug
test('PatBind2', expect_fail, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('PatBind2', expect_broken(9478), compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('PatternSig', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('Recursive', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('ScopedNamedWildcards', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
......@@ -19,7 +19,7 @@ test('PartialTypeSignaturesDisabled', normal, compile_fail, [''])
test('ScopedNamedWildcardsBad', normal, compile_fail, [''])
test('TidyClash', normal, compile_fail, [''])
# Bug
test('TidyClash2', expect_fail, compile_fail, [''])
test('TidyClash2', expect_broken(9478), compile_fail, [''])
test('Trac10045', normal, compile_fail, [''])
test('UnnamedConstraintWildcard1', normal, compile_fail, [''])
test('UnnamedConstraintWildcard2', normal, compile_fail, [''])
......@@ -198,7 +198,7 @@ test('T5996',
['$MAKE -s --no-print-directory T5996'])
test('T8537', normal, compile, [''])
['$MAKE -s --no-print-directory T8832 T8832_WORDSIZE_OPTS=' +
('-DT8832_WORDSIZE_64' if wordsize(64) else '')])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment