[commit: ghc] master: Testsuite: change some expect_fail tests to expect_broken (5e66a69)

git at git.haskell.org git at git.haskell.org
Thu Jun 11 18:00:33 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/5e66a698dae8c01bcd1a9335346145b32016e119/ghc

>---------------------------------------------------------------

commit 5e66a698dae8c01bcd1a9335346145b32016e119
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Wed Jun 3 15:15:57 2015 +0200

    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


>---------------------------------------------------------------

5e66a698dae8c01bcd1a9335346145b32016e119
 testsuite/driver/testlib.py                       | 5 +++++
 testsuite/tests/driver/T8602/T8602.T              | 3 +++
 testsuite/tests/driver/all.T                      | 2 +-
 testsuite/tests/driver/sigof03/all.T              | 2 +-
 testsuite/tests/gadt/all.T                        | 2 ++
 testsuite/tests/gadt/lazypatok.hs                 | 2 +-
 testsuite/tests/partial-sigs/should_compile/all.T | 6 +++---
 testsuite/tests/partial-sigs/should_fail/all.T    | 2 +-
 testsuite/tests/simplCore/should_compile/all.T    | 2 +-
 9 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 671db9a..c6150da 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 7706031..22a63e2 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 5d936d7..fa9e7b0 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 e8df3e1..a143508 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 cbbc0fc..c3d35bc 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 bf1282f..544705f 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 812ff0a..56f1045 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 412dd77..16d809d 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 26f73e9..f7ff85b 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 '')])



More information about the ghc-commits mailing list