Commit 45616133 authored by Alec Theriault's avatar Alec Theriault Committed by Marge Bot
Browse files

Make `haddock_testsuite` respect `--test-accept`

Suppose you've made changes that affect the output of `haddockHtmlTest`
so that the following is failing:

    ./hadrian/build.sh -c --only=haddockHtmlTest test

Then, the following will accept new output for Haddock's test cases.

    ./hadrian/build.sh -c --only=haddockHtmlTest test --test-accept

You still do need to make sure those new changes (which show up in
Haddock's tree) get committed though.

Fixes #16694
parent 39f50bff
Pipeline #6929 canceled with stages
in 99 minutes and 47 seconds
......@@ -24,6 +24,7 @@ htmlTest:
$(haddockTest) \
$(TOP)/../utils/haddock/html-test/Main.hs
./html-test \
$(ACCEPT) \
--ghc-path=$(TEST_HC) \
--haddock-path=$(HADDOCK) \
--haddock-stdout=haddock-out.log
......@@ -39,6 +40,7 @@ latexTest:
$(haddockTest) \
$(TOP)/../utils/haddock/latex-test/Main.hs
./latex-test \
$(ACCEPT) \
--ghc-path=$(TEST_HC) \
--haddock-path=$(HADDOCK) \
--haddock-stdout=haddock-out.log
......@@ -54,6 +56,7 @@ hoogleTest:
$(haddockTest) \
$(TOP)/../utils/haddock/hoogle-test/Main.hs
./hoogle-test \
$(ACCEPT) \
--ghc-path=$(TEST_HC) \
--haddock-path=$(HADDOCK) \
--haddock-stdout=haddock-out.log
......@@ -69,6 +72,7 @@ hypsrcTest:
$(haddockTest) \
$(TOP)/../utils/haddock/hypsrc-test/Main.hs
./hypsrc-test \
$(ACCEPT) \
--ghc-path=$(TEST_HC) \
--haddock-path=$(HADDOCK) \
--haddock-stdout=haddock-out.log
accept = 'ACCEPT=--accept' if config.accept else 'ACCEPT=""'
test('haddockHtmlTest',
[ignore_stdout, ignore_stderr, unless(in_tree_compiler(), skip), req_haddock],
makefile_test,
['htmlTest'])
['htmlTest ' + accept])
test('haddockLatexTest',
[ignore_stdout, ignore_stderr, unless(in_tree_compiler(), skip), req_haddock],
makefile_test,
['latexTest'])
['latexTest ' + accept])
test('haddockHoogleTest',
[ignore_stdout, ignore_stderr, unless(in_tree_compiler(), skip), req_haddock],
makefile_test,
['hoogleTest'])
['hoogleTest ' + accept])
test('haddockHypsrcTest',
[ignore_stdout, ignore_stderr, unless(in_tree_compiler(), skip), req_haddock],
makefile_test,
['hypsrcTest'])
['hypsrcTest ' + accept])
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