Testsuite: change some expect_fail tests to expect_broken
authorThomas Miedema <thomasmiedema@gmail.com>
Wed, 3 Jun 2015 13:15:57 +0000 (15:15 +0200)
committerThomas Miedema <thomasmiedema@gmail.com>
Thu, 11 Jun 2015 18:00:37 +0000 (20:00 +0200)
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

testsuite/driver/testlib.py
testsuite/tests/driver/T8602/T8602.T
testsuite/tests/driver/all.T
testsuite/tests/driver/sigof03/all.T
testsuite/tests/gadt/all.T
testsuite/tests/gadt/lazypatok.hs
testsuite/tests/partial-sigs/should_compile/all.T
testsuite/tests/partial-sigs/should_fail/all.T
testsuite/tests/simplCore/should_compile/all.T

index 671db9a..c6150da 100644 (file)
@@ -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 ):
index 7706031..22a63e2 100644 (file)
@@ -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'])
index 5d936d7..fa9e7b0 100644 (file)
@@ -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'])
index e8df3e1..a143508 100644 (file)
@@ -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'])
index cbbc0fc..c3d35bc 100644 (file)
@@ -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, [''])
index bf1282f..544705f 100644 (file)
@@ -2,7 +2,7 @@
 \r
 -- It's not clear whether this one should succed or fail,\r
 -- Arguably it should succeed because the type refinement on\r
--- T1 should make (y::Int).  Currently, though, it succeeds\r
+-- T1 should make (y::Int).  Currently, though, it fails.
 \r
 module ShouldFail where\r
 \r
index 812ff0a..56f1045 100644 (file)
@@ -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'])
index 412dd77..16d809d 100644 (file)
@@ -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, [''])
index 26f73e9..f7ff85b 100644 (file)
@@ -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 '')])