Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/888daa51a7d656bba5f39e16e6396ba9d4d29f4c >--------------------------------------------------------------- commit 888daa51a7d656bba5f39e16e6396ba9d4d29f4c Author: Ian Lynagh <i...@well-typed.com> Date: Sat Nov 10 14:37:16 2012 +0000 Add if_compiler_debugged to testsuite driver arrowfail001 currently fails only when DEBUG is defined. >--------------------------------------------------------------- config/ghc | 2 ++ driver/testlib.py | 6 ++++++ mk/ghc-config.hs | 1 + mk/test.mk | 2 ++ tests/arrows/should_fail/all.T | 5 ++++- 5 files changed, 15 insertions(+), 1 deletions(-) diff --git a/config/ghc b/config/ghc index 98a7c33..6803248 100644 --- a/config/ghc +++ b/config/ghc @@ -35,6 +35,8 @@ if (ghc_with_native_codegen == 1): config.compile_ways.append('optasm') config.run_ways.append('optasm') +config.compiler_debugged = ghc_debugged + if (ghc_with_vanilla == 1): config.have_vanilla = True diff --git a/driver/testlib.py b/driver/testlib.py index 70ed040..1e86db4 100644 --- a/driver/testlib.py +++ b/driver/testlib.py @@ -420,6 +420,12 @@ def if_compiler_ge( compiler, version, f ): else: return normal +def if_compiler_debugged( f ): + if config.compiler_debugged: + return f + else: + return normal + def namebase( nb ): return lambda opts, nb=nb: _namebase(opts, nb) diff --git a/mk/ghc-config.hs b/mk/ghc-config.hs index b667b84..3145488 100644 --- a/mk/ghc-config.hs +++ b/mk/ghc-config.hs @@ -17,6 +17,7 @@ main = do let fields = read info :: [(String,String)] getGhcFieldOrFail fields "GhcStage" "Stage" + getGhcFieldOrFail fields "GhcDebugged" "Debug on" getGhcFieldOrFail fields "GhcWithNativeCodeGen" "Have native code generator" getGhcFieldOrFail fields "GhcWithInterpreter" "Have interpreter" getGhcFieldOrFail fields "GhcUnregisterised" "Unregisterised" diff --git a/mk/test.mk b/mk/test.mk index 8b28944..942271c 100644 --- a/mk/test.mk +++ b/mk/test.mk @@ -39,6 +39,8 @@ endif RUNTEST_OPTS += -e ghc_compiler_always_flags="'$(TEST_HC_OPTS)'" +RUNTEST_OPTS += -e ghc_debugged=$(GhcDebugged) + ifeq "$(GhcWithNativeCodeGen)" "YES" RUNTEST_OPTS += -e ghc_with_native_codegen=1 else diff --git a/tests/arrows/should_fail/all.T b/tests/arrows/should_fail/all.T index ef7aac6..5579294 100644 --- a/tests/arrows/should_fail/all.T +++ b/tests/arrows/should_fail/all.T @@ -1,6 +1,9 @@ setTestOpts(only_compiler_types(['ghc'])) -test('arrowfail001', expect_broken(5267), compile_fail, ['']) +test('arrowfail001', + if_compiler_debugged(expect_broken(5267)), + compile_fail, + ['']) # arrowfail001 gets an ASSERT error in the stage1 compiler # because we simply are not typechecking arrow commands # correcly. See Trac #5267, #5609, #5605 _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc