diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-11-10 14:37:16 +0000 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-11-10 14:37:16 +0000 |
commit | ec56be8fb169410d662b91321fe356f6006d1ced (patch) | |
tree | c14d47f9a12193b24366f47c1455359f707430c9 /testsuite | |
parent | 16f685e2b1cbef35568abb5c1603416fbfdb190a (diff) | |
download | haskell-ec56be8fb169410d662b91321fe356f6006d1ced.tar.gz |
Add if_compiler_debugged to testsuite driver
arrowfail001 currently fails only when DEBUG is defined.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/config/ghc | 2 | ||||
-rw-r--r-- | testsuite/driver/testlib.py | 6 | ||||
-rw-r--r-- | testsuite/mk/ghc-config.hs | 1 | ||||
-rw-r--r-- | testsuite/mk/test.mk | 2 | ||||
-rw-r--r-- | testsuite/tests/arrows/should_fail/all.T | 5 |
5 files changed, 15 insertions, 1 deletions
diff --git a/testsuite/config/ghc b/testsuite/config/ghc index 98a7c334c1..68032485a2 100644 --- a/testsuite/config/ghc +++ b/testsuite/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/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index 70ed040683..1e86db4a51 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/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/testsuite/mk/ghc-config.hs b/testsuite/mk/ghc-config.hs index b667b84d66..3145488904 100644 --- a/testsuite/mk/ghc-config.hs +++ b/testsuite/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/testsuite/mk/test.mk b/testsuite/mk/test.mk index 8b289441d0..942271c0fc 100644 --- a/testsuite/mk/test.mk +++ b/testsuite/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/testsuite/tests/arrows/should_fail/all.T b/testsuite/tests/arrows/should_fail/all.T index ef7aac6fa0..5579294541 100644 --- a/testsuite/tests/arrows/should_fail/all.T +++ b/testsuite/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 |