summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Theriault <alec.theriault@gmail.com>2019-05-29 11:33:35 (GMT)
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-06-11 22:41:14 (GMT)
commit45616133efba0c17a461ecf085427b7956250fad (patch)
tree1c8c14b13688f2bebddd94d915d0a80d16842ecc
parent39f50bff3ea913a7f4b1d915660bcf77b9327e2e (diff)
downloadghc-45616133efba0c17a461ecf085427b7956250fad.zip
ghc-45616133efba0c17a461ecf085427b7956250fad.tar.gz
ghc-45616133efba0c17a461ecf085427b7956250fad.tar.bz2
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
-rw-r--r--testsuite/tests/haddock/haddock_testsuite/Makefile4
-rw-r--r--testsuite/tests/haddock/haddock_testsuite/all.T10
2 files changed, 10 insertions, 4 deletions
diff --git a/testsuite/tests/haddock/haddock_testsuite/Makefile b/testsuite/tests/haddock/haddock_testsuite/Makefile
index 37b0a98..4a86ee1 100644
--- a/testsuite/tests/haddock/haddock_testsuite/Makefile
+++ b/testsuite/tests/haddock/haddock_testsuite/Makefile
@@ -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
diff --git a/testsuite/tests/haddock/haddock_testsuite/all.T b/testsuite/tests/haddock/haddock_testsuite/all.T
index df7dc74..dc3e345 100644
--- a/testsuite/tests/haddock/haddock_testsuite/all.T
+++ b/testsuite/tests/haddock/haddock_testsuite/all.T
@@ -1,19 +1,21 @@
+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])