@@ -30,6 +30,55 @@ hope to fix this before merging this PR:
30
30
nix-build default.nix -A $pkg .coverageReport
31
31
```
32
32
33
+ This will generate a coverage report for the package you requested.
34
+ The directory tree will look something like this:
35
+
36
+ ```
37
+ /nix/store/...-my-project-0.1.0.0-coverage-report/
38
+ └── share
39
+ └── hpc
40
+ ├── mix
41
+ │ ├── my-library-0.1.0.0
42
+ │ │ └── my-library-0.1.0.0-ERSaOroBZhe9awsoBkhmcV
43
+ │ │ ├── My.Lib.Config.mix
44
+ │ │ ├── My.Lib.Types.mix
45
+ │ │ └── My.Lib.Util.mix
46
+ │ └── my-test-1
47
+ │ ├── Spec.mix
48
+ │ └── Main.mix
49
+ ├── tix
50
+ │ ├── my-library-0.1.0.0
51
+ │ │ └── my-library-0.1.0.0.tix
52
+ │ └── my-test-1
53
+ │ └── my-test-1.tix
54
+ └── html
55
+ ├── my-library-0.1.0.0
56
+ │ ├── my-library-0.1.0.0-ERSaOroBZhe9awsoBkhmcV
57
+ │ │ ├── My.Lib.Config.hs.html
58
+ │ │ ├── My.Lib.Types.hs.html
59
+ │ │ └── My.Lib.Util.hs.html
60
+ │ ├── hpc_index_alt.html
61
+ │ ├── hpc_index_exp.html
62
+ │ ├── hpc_index_fun.html
63
+ │ └── hpc_index.html
64
+ └── my-test-1
65
+ ├── my-library-0.1.0.0-ERSaOroBZhe9awsoBkhmcV
66
+ │ ├── My.Lib.Config.hs.html
67
+ │ ├── My.Lib.Types.hs.html
68
+ │ └── My.Lib.Util.hs.html
69
+ ├── hpc_index_alt.html
70
+ ├── hpc_index_exp.html
71
+ ├── hpc_index_fun.html
72
+ └── hpc_index.html
73
+ ```
74
+
75
+ - The hpc artifacts generated live in the ` mix ` and ` tix ` directories.
76
+ - Marked-up reports live in the ` html ` directory.
77
+ - ` html/$library-$version/hpc_index.html ` is the report of how much
78
+ that library was covered by the tests.
79
+ - ` html/$test/hpc_index.html ` is the report of how much that test
80
+ contributed towards the library coverage total.
81
+
33
82
## Project-wide
34
83
35
84
``` bash
@@ -40,9 +89,76 @@ This will generate a coverage report for all the local packages in
40
89
your project, the directory tree will look something like this:
41
90
42
91
``` bash
92
+ /nix/store/...-coverage-report
93
+ └── share
94
+ └── hpc
95
+ ├── mix
96
+ │ ├── my-library-0.1.0.0
97
+ │ │ └── my-library-0.1.0.0-ERSaOroBZhe9awsoBkhmcV
98
+ │ │ ├── My.Lib.Config.mix
99
+ │ │ ├── My.Lib.Types.mix
100
+ │ │ └── My.Lib.Util.mix
101
+ │ ├── my-test-1
102
+ │ │ ├── Spec.mix
103
+ │ │ └── Main.mix
104
+ │ ├── other-library-0.1.0.0
105
+ │ │ └── other-library-0.1.0.0-48EVZBwW9Kj29VTaRMhBDf
106
+ │ │ ├── Other.Lib.A.mix
107
+ │ │ └── Other.Lib.B.mix
108
+ │ └── other-test-1
109
+ │ ├── Spec.mix
110
+ │ └── Main.mix
111
+ ├── tix
112
+ │ ├── all
113
+ │ │ └── all.tix
114
+ │ ├── my-library-0.1.0.0
115
+ │ │ └── my-library-0.1.0.0.tix
116
+ │ ├── my-test-1
117
+ │ │ └── my-test-1.tix
118
+ │ ├── other-library-0.1.0.0
119
+ │ │ └── other-library-0.1.0.0.tix
120
+ │ └── other-test-1
121
+ │ └── other-test-1.tix
122
+ └── html
123
+ ├── my-library-0.1.0.0
124
+ │ ├── my-library-0.1.0.0-ERSaOroBZhe9awsoBkhmcV
125
+ │ │ ├── My.Lib.Config.hs.html
126
+ │ │ ├── My.Lib.Types.hs.html
127
+ │ │ └── My.Lib.Util.hs.html
128
+ │ ├── hpc_index_alt.html
129
+ │ ├── hpc_index_exp.html
130
+ │ ├── hpc_index_fun.html
131
+ │ └── hpc_index.html
132
+ ├── my-test-1
133
+ │ ├── my-library-0.1.0.0-ERSaOroBZhe9awsoBkhmcV
134
+ │ │ ├── My.Lib.Config.hs.html
135
+ │ │ ├── My.Lib.Types.hs.html
136
+ │ │ └── My.Lib.Util.hs.html
137
+ │ ├── hpc_index_alt.html
138
+ │ ├── hpc_index_exp.html
139
+ │ ├── hpc_index_fun.html
140
+ │ └── hpc_index.html
141
+ ├── other-libray-0.1.0.0
142
+ │ ├── other-library-0.1.0.0-48EVZBwW9Kj29VTaRMhBDf
143
+ │ │ ├── Other.Lib.A.hs.html
144
+ │ │ └── Other.Lib.B.hs.html
145
+ │ ├── hpc_index_alt.html
146
+ │ ├── hpc_index_exp.html
147
+ │ ├── hpc_index_fun.html
148
+ │ └── hpc_index.html
149
+ ├── other-test-1
150
+ │ ├── other-library-0.1.0.0-48EVZBwW9Kj29VTaRMhBDf
151
+ │ │ ├── Other.Lib.A.hs.html
152
+ │ │ └── Other.Lib.B.hs.html
153
+ │ ├── hpc_index_alt.html
154
+ │ ├── hpc_index_exp.html
155
+ │ ├── hpc_index_fun.html
156
+ │ └── hpc_index.html
157
+ └── index.html
43
158
```
44
159
45
- "all" is a synthetic test target that sums the test coverage
46
- information from all of your test suites.
47
-
48
- all/index.html is the HTML coverage report for the project
160
+ Of particular interest:
161
+ - "all" is a synthetic test target that sums the test coverage
162
+ information from all of your test suites.
163
+ - ` all/index.html ` is the HTML coverage report for the entire
164
+ project.
0 commit comments