-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Record exception backtraces during test suite runs #317
Conversation
f08632a
to
56a7c22
Compare
The
The segfault happens at the very end of running the binary, during flushing on the call to |
56a7c22
to
92ef81e
Compare
5583769
to
b896883
Compare
The number of lines in the stack trace of a failure is compiler-dependent, so it should not be captured in the test cases.
b896883
to
14ac451
Compare
Rebased and fixed the expect tests to account for changes made in #326. |
49e6a18
to
23b91f4
Compare
At time of writing, this varies according to the version of `lwt` that is installed, so we can't snapshot it in the expect tests.
23b91f4
to
aef3ebe
Compare
FTR, I tried to avoid duplicating snapshot outputs between the native and JS expect tests (here), but couldn't find a Merging now as the CI is happy. |
…and alcotest-lwt (1.5.0) CHANGES: - Make Alcotest compatible with `js_of_ocaml.3.11.0`. Users can depend on the new virtual `alcotest-js` Opam library to pick up the right `js_of_ocaml` version automatically. (mirage/alcotest#326 mirage/alcotest#328, @hhugo @smorimoto) - Record exception backtraces during test suite runs by default. This behaviour can be disabled by passing `~record_backtrace:false` to `Alcotest.run`. (mirage/alcotest#317, @craigfe) - Generate shorter unique identifiers for test runs (8-character alphanumeric, rather than a full 128-bit UUID). (mirage/alcotest#304, @craigfe) - Change `Alcotest.{char,string}` pretty-printers to use OCaml syntax on assertion failures (i.e. wrap with quotes and escape control characters). (mirage/alcotest#318, @craigfe) - Fix process for getting the width of attached terminals on MacOS. Previously, a terminal width of 80 columns was assumed. (mirage/alcotest#325, @craigfe) - Fix parsing of test filter ranges to allow '-' separators (e.g. `test alpha 1-4`), as advertised in the manpage. The previously-used '..' separator is also supported. (mirage/alcotest#312, @craigfe) - Introduce an `Alcotest.V1` module that aliases the existing `Alcotest` API and provides a stability guarantee over major version changes. Similar versioned aliases also exist for the backends: `Alcotest_{async,lwt}.V1`. (mirage/alcotest#306, @craigfe) - Change the `~filter` argument to `Alcotest.run` to be a predicate over tests. (mirage/alcotest#305, @craigfe) - Renamed / removed some less frequently used modules used by the test backends: - `Alcotest.Unix` -> `Alcotest.Unix_platform` - `Alcotest_engine.{Cli,Core,Test}` -> `Alcotest_engine.V1.{Cli,Core,Test}` - `Alcotest.{Cli,Core}` are now gone. Use `Alcotest_engine.V1.{Cli,Core}.Make (Alcotest.Unix_platform)` instead. (mirage/alcotest#306 mirage/alcotest#309, @craigfe) - Avoid exporting `list_tests` in the main test APIs (`Alcotest{,_lwt,_async}`). Use `Alcotest_engine` directly if you want this function. (mirage/alcotest#310, @craigfe)
…and alcotest-lwt (1.5.0) CHANGES: - Make Alcotest compatible with `js_of_ocaml.3.11.0`. Users can depend on the new virtual `alcotest-js` Opam library to pick up the right `js_of_ocaml` version automatically. (mirage/alcotest#326 mirage/alcotest#328, @hhugo @smorimoto) - Record exception backtraces during test suite runs by default. This behaviour can be disabled by passing `~record_backtrace:false` to `Alcotest.run`. (mirage/alcotest#317, @craigfe) - Generate shorter unique identifiers for test runs (8-character alphanumeric, rather than a full 128-bit UUID). (mirage/alcotest#304, @craigfe) - Change `Alcotest.{char,string}` pretty-printers to use OCaml syntax on assertion failures (i.e. wrap with quotes and escape control characters). (mirage/alcotest#318, @craigfe) - Fix process for getting the width of attached terminals on MacOS. Previously, a terminal width of 80 columns was assumed. (mirage/alcotest#325, @craigfe) - Fix parsing of test filter ranges to allow '-' separators (e.g. `test alpha 1-4`), as advertised in the manpage. The previously-used '..' separator is also supported. (mirage/alcotest#312, @craigfe) - Introduce an `Alcotest.V1` module that aliases the existing `Alcotest` API and provides a stability guarantee over major version changes. Similar versioned aliases also exist for the backends: `Alcotest_{async,lwt}.V1`. (mirage/alcotest#306, @craigfe) - Change the `~filter` argument to `Alcotest.run` to be a predicate over tests. (mirage/alcotest#305, @craigfe) - Renamed / removed some less frequently used modules used by the test backends: - `Alcotest.Unix` -> `Alcotest.Unix_platform` - `Alcotest_engine.{Cli,Core,Test}` -> `Alcotest_engine.V1.{Cli,Core,Test}` - `Alcotest.{Cli,Core}` are now gone. Use `Alcotest_engine.V1.{Cli,Core}.Make (Alcotest.Unix_platform)` instead. (mirage/alcotest#306 mirage/alcotest#309, @craigfe) - Avoid exporting `list_tests` in the main test APIs (`Alcotest{,_lwt,_async}`). Use `Alcotest_engine` directly if you want this function. (mirage/alcotest#310, @craigfe)
The major downside is that it's now easier to introduce a change behaving differently in native and js |
Agreed. If I'd found a way to do reproducible diffing, I'd have gone with that instead. For now, it'll be necessary to run some diff tool manually when tests are added. |
Fix #315.