File tree Expand file tree Collapse file tree 5 files changed +43
-8
lines changed
Cabal/src/Distribution/Simple/Setup Expand file tree Collapse file tree 5 files changed +43
-8
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ defaultTestFlags = TestFlags {
92
92
testVerbosity = Flag normal,
93
93
testHumanLog = toFlag $ toPathTemplate $ " $pkgid-$test-suite.log" ,
94
94
testMachineLog = toFlag $ toPathTemplate $ " $pkgid.log" ,
95
- testShowDetails = toFlag Failures ,
95
+ testShowDetails = toFlag Direct ,
96
96
testKeepTix = toFlag False ,
97
97
testWrapper = NoFlag ,
98
98
testFailWhenNoTestSuites = toFlag False ,
Original file line number Diff line number Diff line change
1
+ synopsis: Make --(test-)show-details=direct the default
2
+ packages: Cabal cabal-install
3
+ prs: #8942
4
+
5
+ description: {
6
+
7
+ This option leaves it up to the testing framework to decide what and how to print out,
8
+ potentially leading to a prettier output. For example, most of the testing frameworks
9
+ use colors, which wouldn't be seen with any other option.
10
+
11
+ This comes with a tradeoff, though: Cabal will not create a log file with this option.
12
+ If you prefer a log file, consider setting `--test-show-details=streaming` (or something
13
+ else) manually.
14
+
15
+ }
Original file line number Diff line number Diff line change @@ -11,10 +11,15 @@ http://cabal.readthedocs.io/
11
11
12
12
### How to build it
13
13
14
- Building the documentation requires Python 3 be installed
15
- * ` > make users-guide `
16
- * Python on Mac OS X dislikes ` LC_CTYPE=UTF-8 ` , unset the env var in
17
- terminal preferences and instead set ` LC_ALL=en_US.UTF-8 ` or something
14
+ Building the documentation requires Python 3 and PIP. From the root of cabal
15
+ repository run:
16
+
17
+ ``` console
18
+ make users-guide
19
+ ```
20
+
21
+ Note: Python on Mac OS X dislikes ` LC_CTYPE=UTF-8 ` , so unset the variable
22
+ and instead set ` LC_ALL=en_US.UTF-8 ` .
18
23
19
24
### Gitpod workflow
20
25
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ legacy sections. We talk in detail about some global and package commands.
26
26
27
27
run Run an executable.
28
28
repl Open an interactive session for the given component.
29
- test Run test- suites.
29
+ test Run test suites.
30
30
bench Run benchmarks.
31
31
32
32
sdist Generate a source distribution file (.tar.gz).
@@ -970,13 +970,22 @@ cabal bench
970
970
(all the benchmarks in the current package by default), first ensuring
971
971
they are up to date.
972
972
973
+ ``cabal bench `` inherits flags of the ``bench `` subcommand of ``Setup.hs ``,
974
+ :ref: `see the corresponding section <setup-bench >`.
975
+
973
976
cabal test
974
977
^^^^^^^^^^
975
978
976
979
``cabal test [TARGETS] [OPTIONS] `` runs the specified test suites
977
980
(all the test suites in the current package by default), first ensuring
978
981
they are up to date.
979
982
983
+ ``cabal test `` inherits flags of the ``test `` subcommand of ``Setup.hs ``
984
+ (:ref: `see the corresponding section <setup-test >`) with one caveat: every
985
+ ``Setup.hs test `` flag receives the ``test- `` prefix if it already does
986
+ not have one; e.g. ``--show-details `` becomes ``--test-show-details `` but
987
+ ``--test-wrapper `` remains the same.
988
+
980
989
cabal exec
981
990
^^^^^^^^^^
982
991
Original file line number Diff line number Diff line change @@ -1292,8 +1292,14 @@ the package.
1292
1292
1293
1293
Determines if the results of individual test cases are shown on the
1294
1294
terminal. May be ``always `` (always show), ``never `` (never show),
1295
- ``failures `` (show only failed results), or ``streaming `` (show all
1296
- results in real time).
1295
+ ``failures `` (show only failed results), ``streaming `` (show all
1296
+ results in real time) and ``direct `` (same as ``streaming `` but no log
1297
+ file and possibly prettier).
1298
+
1299
+ Default value is ``direct ``: it leaves test output untouched and does not
1300
+ produce a log. This allows for colored output, which is popular with testing
1301
+ frameworks. (On the other hand, ``streaming `` creates a log but looses
1302
+ coloring.)
1297
1303
1298
1304
.. option :: --test-options=options
1299
1305
You can’t perform that action at this time.
0 commit comments