Commit 05cbdd2
committed
Only read stdout when running with
When not running with `-V` or `--more-verbose`, we now pipe the stdout
of the executable under test to /dev/null. This prevents quickbench from
running out of memory in case the output is huge (GBs).
MINOR REMARK
With my version of GHC (9.6.6), all exceptions unfortunately get annoted
`withBinaryFile`, see https://gitlab.haskell.org/ghc/ghc/-/issues/20886.
For example, when running `quickbench -w doesnotexist`, the error
message is:
```
/dev/null: withBinaryFile: does not exist (No such file or directory)
```
When running `quickbench -w doesnotexist --more-verbose`, avoiding the
call to `withBinaryFile`, the error message is the much clearer:
```
doesnotexist: readCreateProcess: posix_spawnp: does not exist (No such file or directory)
```
This is not ideal, but I believe using the latest version of GHC will
fix it.--more-verbose
1 parent ca3c22e commit 05cbdd2
1 file changed
+24
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
198 | 200 | | |
199 | 201 | | |
200 | 202 | | |
201 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
202 | 206 | | |
203 | | - | |
204 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
205 | 210 | | |
206 | 211 | | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
212 | 228 | | |
213 | 229 | | |
214 | 230 | | |
| |||
0 commit comments