summaryrefslogtreecommitdiff
path: root/hadrian/doc
diff options
context:
space:
mode:
authorAlp Mestanogullari <alpmestan@gmail.com>2019-04-11 17:06:34 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-04-12 14:46:54 -0400
commitf4b5a6c040abb492367fdfe18c4f2ebf03c0d084 (patch)
tree1c25fb1107c614add249233179dd4da498c6528b /hadrian/doc
parent3c759ced1c894da2358d12fa91e20f12adf0e5bd (diff)
downloadhaskell-f4b5a6c040abb492367fdfe18c4f2ebf03c0d084.tar.gz
Hadrian: document -a/--test-accept
Diffstat (limited to 'hadrian/doc')
-rw-r--r--hadrian/doc/make.md8
-rw-r--r--hadrian/doc/testsuite.md25
2 files changed, 33 insertions, 0 deletions
diff --git a/hadrian/doc/make.md b/hadrian/doc/make.md
index e2b790d385..c163317a18 100644
--- a/hadrian/doc/make.md
+++ b/hadrian/doc/make.md
@@ -123,6 +123,8 @@ time you fire up a build. This is not possible with the Make build system.
make test # (1)
make test TEST=plugins01 # (2)
make test TEST="plugins01 plugins02" # (3)
+ make accept # (4)
+ PLATFORM=YES OS=YES make accept # (5)
# Hadrian
@@ -134,6 +136,12 @@ time you fire up a build. This is not possible with the Make build system.
build test --only="plugins01 plugins02" # equivalent to (3)
TEST="plugins01 plugins02" build test # equivalent to (3)
TEST=plugins01 build test --only=plugins02 # equivalent to (3)
+
+ build test -a # equivalent to (4)
+ build test --test-accept # equivalent to (4)
+
+ PLATFORM=YES OS=YES build test -a # equivalent to (5)
+ PLATFORM=YES OS=YES build test --test-accept # equivalent to (5)
```
As illustrated in the examples above, you can use the `TEST` environment
diff --git a/hadrian/doc/testsuite.md b/hadrian/doc/testsuite.md
index bdc7186b54..f1164ff39e 100644
--- a/hadrian/doc/testsuite.md
+++ b/hadrian/doc/testsuite.md
@@ -40,6 +40,31 @@ TEST="test1 test2" build test
TEST="test1 test2" build test --only="test3 test4"
```
+## Accepting new output
+
+You can use the `-a` or `--test-accept` flag to "accept" the new
+output of your tests. This has the effect of updating the expected
+output of all the tests that fail due to mismatching output, so as to
+consider the new output the correct one.
+
+When the `PLATFORM` environment variable is set to `YES`, passing this flag has
+the effect of accepting the new output for the current platform.
+
+When the `OS` environment variable is set to `YES`, passing this flag has the
+effect of accepting the new output for all word sizes on the current OS.
+
+``` sh
+# accept new output for all tests
+build test -a
+
+# just run and accept new output for 'test123' and 'test456'
+build test -a --only="test123 test456"
+
+# accept new output for current platform and all word sizes for
+# the current OS, for all tests
+PLATFORM=YES OS=YES build test -a
+```
+
## Performance tests
You can use the `--only-perf` and `--skip-perf` flags to