diff options
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 |