diff options
author | Tamar Christina <tamar@zhox.com> | 2016-12-05 20:51:11 +0000 |
---|---|---|
committer | Tamar Christina <tamar@zhox.com> | 2016-12-05 20:51:11 +0000 |
commit | 847d229346431483b99adcff12e46c7bf6af15da (patch) | |
tree | 578609c4ea091c71eb83b2d33ba80a3dc1d1ac63 /testsuite/mk | |
parent | 3e3f7c21a64758c671192c63a741ecc4a5a08831 (diff) | |
download | haskell-847d229346431483b99adcff12e46c7bf6af15da.tar.gz |
Color output is wreaking havoc on test results
Summary:
D2716 introduced colors into the output of GHC.
These color ourputs are done using escape characters output
to the terminal.
These however are wreaking havoc on the testsuite output as now
no stderr with a warning or error will match anymore.
Instead of accepting the new codes as expected values instead I
turn them off. So the testsuite is consistent on platforms/terminals we
don't support colors on.
Test Plan:
any test that outputs colors. e.g.
make test TEST=T9576
Reviewers: austin, Rufflewind, bgamari
Subscribers: thomie, #ghc_windows_task_force
Differential Revision: https://phabricator.haskell.org/D2787
GHC Trac Issues: #8809
Diffstat (limited to 'testsuite/mk')
-rw-r--r-- | testsuite/mk/ghc-config.hs | 6 | ||||
-rw-r--r-- | testsuite/mk/test.mk | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/mk/ghc-config.hs b/testsuite/mk/ghc-config.hs index 84f1523fd5..cf550082db 100644 --- a/testsuite/mk/ghc-config.hs +++ b/testsuite/mk/ghc-config.hs @@ -42,6 +42,12 @@ main = do _ -> "NO" putStrLn $ "MinGhcVersion711" ++ '=':minGhcVersion711 + let minGhcVersion801 = case lookup "Project version" fields of + Just v + | parseVersion v >= [8,1] -> "YES" + _ -> "NO" + putStrLn $ "MinGhcVersion801" ++ '=':minGhcVersion801 + getGhcFieldOrFail :: [(String,String)] -> String -> String -> IO () getGhcFieldOrFail fields mkvar key diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk index d4bd5feb66..16be955992 100644 --- a/testsuite/mk/test.mk +++ b/testsuite/mk/test.mk @@ -43,6 +43,12 @@ TEST_HC_OPTS += -fno-warn-missed-specialisations TEST_HC_OPTS += -fshow-warning-groups endif +ifeq "$(MinGhcVersion801)" "YES" +# Turn off any VT800 codes in the output or they wreak havoc on the +# testsuite output. +TEST_HC_OPTS += -fdiagnostics-color=never +endif + # Add the no-debug-output last as it is often convenient to copy the test invocation # removing this line. TEST_HC_OPTS += -dno-debug-output |