Commit 847d2293 authored by Tamar Christina's avatar Tamar Christina

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
parent 3e3f7c21
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment