Commit 2823eb9
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 1857a8e commit 2823eb9
1 file changed
Lines changed: 24 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
222 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
223 | 227 | | |
224 | | - | |
225 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
226 | 231 | | |
227 | 232 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
233 | 249 | | |
234 | 250 | | |
235 | 251 | | |
| |||
0 commit comments