summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-06-03 15:15:57 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2015-06-11 20:00:37 +0200
commit5e66a698dae8c01bcd1a9335346145b32016e119 (patch)
treefbb6b45c5ec7051856d9af1b1e9da0c81aba3a8e
parent6cefeb373e13c25f6c8c1d08975e14a8655f0bc9 (diff)
downloadhaskell-5e66a698dae8c01bcd1a9335346145b32016e119.tar.gz
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: https://phabricator.haskell.org/D966
-rw-r--r--testsuite/driver/testlib.py5
-rw-r--r--testsuite/tests/driver/T8602/T8602.T3
-rw-r--r--testsuite/tests/driver/all.T2
-rw-r--r--testsuite/tests/driver/sigof03/all.T2
-rw-r--r--testsuite/tests/gadt/all.T2
-rw-r--r--testsuite/tests/gadt/lazypatok.hs2
-rw-r--r--testsuite/tests/partial-sigs/should_compile/all.T6
-rw-r--r--testsuite/tests/partial-sigs/should_fail/all.T2
-rw-r--r--testsuite/tests/simplCore/should_compile/all.T2
9 files changed, 18 insertions, 8 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 671db9afb8..c6150da0b8 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -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 ):
diff --git a/testsuite/tests/driver/T8602/T8602.T b/testsuite/tests/driver/T8602/T8602.T
index 7706031c1b..22a63e2fd8 100644
--- a/testsuite/tests/driver/T8602/T8602.T
+++ b/testsuite/tests/driver/T8602/T8602.T
@@ -1,4 +1,7 @@
test('T8602',
[extra_clean(['t8602.sh']),
+ # 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'])
diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T
index 5d936d764f..fa9e7b04a7 100644
--- a/testsuite/tests/driver/all.T
+++ b/testsuite/tests/driver/all.T
@@ -317,7 +317,7 @@ else:
only_darwin = skip
test('static001',
- [only_darwin, expect_fail,
+ [only_darwin, expect_broken(8127),
extra_clean(['Static001.hi', 'Static001.o', 'liba.a', 'Static001_stub.h', 'Static001_stub.o'])],
run_command,
['$MAKE -s --no-print-directory static001'])
diff --git a/testsuite/tests/driver/sigof03/all.T b/testsuite/tests/driver/sigof03/all.T
index e8df3e10f4..a1435089d4 100644
--- a/testsuite/tests/driver/sigof03/all.T
+++ b/testsuite/tests/driver/sigof03/all.T
@@ -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)
test('sigof03m',
- [ clean_cmd('rm -rf tmp_sigof03m'), expect_fail ],
+ [ clean_cmd('rm -rf tmp_sigof03m'), expect_broken(9252) ],
run_command,
['$MAKE -s --no-print-directory sigof03m'])
diff --git a/testsuite/tests/gadt/all.T b/testsuite/tests/gadt/all.T
index cbbc0fc722..c3d35bc02a 100644
--- a/testsuite/tests/gadt/all.T
+++ b/testsuite/tests/gadt/all.T
@@ -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, [''])
diff --git a/testsuite/tests/gadt/lazypatok.hs b/testsuite/tests/gadt/lazypatok.hs
index bf1282fe39..544705f92d 100644
--- a/testsuite/tests/gadt/lazypatok.hs
+++ b/testsuite/tests/gadt/lazypatok.hs
@@ -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
diff --git a/testsuite/tests/partial-sigs/should_compile/all.T b/testsuite/tests/partial-sigs/should_compile/all.T
index 812ff0a4cf..56f1045cce 100644
--- a/testsuite/tests/partial-sigs/should_compile/all.T
+++ b/testsuite/tests/partial-sigs/should_compile/all.T
@@ -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'])
diff --git a/testsuite/tests/partial-sigs/should_fail/all.T b/testsuite/tests/partial-sigs/should_fail/all.T
index 412dd77387..16d809dc33 100644
--- a/testsuite/tests/partial-sigs/should_fail/all.T
+++ b/testsuite/tests/partial-sigs/should_fail/all.T
@@ -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, [''])
diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T
index 26f73e9e48..f7ff85beec 100644
--- a/testsuite/tests/simplCore/should_compile/all.T
+++ b/testsuite/tests/simplCore/should_compile/all.T
@@ -198,7 +198,7 @@ test('T5996',
['$MAKE -s --no-print-directory T5996'])
test('T8537', normal, compile, [''])
test('T8832',
- expect_fail,
+ expect_broken(8832),
run_command,
['$MAKE -s --no-print-directory T8832 T8832_WORDSIZE_OPTS=' +
('-DT8832_WORDSIZE_64' if wordsize(64) else '')])