Commit 6199ef1
committed
Alcotest.run: ensure and_exit and record_backtrace can be overriden for the test sub-command too
`default_cmd` handles this correctly, but `test_cmd` always set
`and_exit` and `record_backtrace` to `true`.
Due to `Config.User.(cli_config || config)` this meant that `and_exit`
couldn't be set to `false` by the caller.
The main program may want to set `and_exit` to false if it has some
wrappers using `Fun.protect` for example, with `and_exit` set to true
these wouldn't run.
For backwards compatibility with old versions of alcotest one workaround
is to use `at_exit` instead of `Fun.protect` to register cleanup
handlers.
Fixes #438
Signed-off-by: Edwin Török <edwin@tarides.com>1 parent b26e58f commit 6199ef1
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
133 | | - | |
| 135 | + | |
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
| |||
0 commit comments