mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-25 20:14:31 +01:00
84 lines
4.7 KiB
TOML
84 lines
4.7 KiB
TOML
# cargo-nextest (https://nexte.st) runs every test in its own process, in parallel across test
|
|
# binaries. Every leg of the Workspace gate uses it (.github/workflows/workspace.yml); local runs may
|
|
# keep `cargo test`. Nextest does not run doctests, so the gate also runs `cargo test --doc`.
|
|
#
|
|
# cargo nextest run --workspace --profile ci
|
|
# cargo test --workspace --doc
|
|
#
|
|
# Refuse an older nextest: CI installs exactly this version (GHSA-vc25-qg58-w57c is fixed in it).
|
|
nextest-version = "0.9.150"
|
|
|
|
# Some tests share a resource that an in-process mutex keeps to one test at a time. With one
|
|
# process per test those mutexes no longer serialize anything, so these groups do it instead, one
|
|
# test at a time, as under `cargo test`.
|
|
[test-groups]
|
|
# craft-ui: `gpu_test_lock()` / `gpu_lock()`. Each renderer creates its own wgpu instance and
|
|
# device, and creating or destroying one while another test uses its device can crash.
|
|
gpu = { max-threads = 1 }
|
|
# craft-video h264_decode: `FIXTURE_GENERATION` keeps a second producer from replacing a fixture
|
|
# file another test is reading.
|
|
video-fixtures = { max-threads = 1 }
|
|
# craft-print: `PRINT_TICKET_PROVIDER` serializes the Windows PrintTicket provider, and the tests
|
|
# share the one test print queue the gate installs.
|
|
print = { max-threads = 1 }
|
|
# craft-video integration tests on Linux and macOS: the binaries generate and read the same fixture
|
|
# directories (see the `ci` overrides below).
|
|
video-integration = { max-threads = 1 }
|
|
|
|
[[profile.default.overrides]]
|
|
filter = 'package(craft-video) & binary(it) & test(/^h264_decode::/)'
|
|
test-group = 'video-fixtures'
|
|
|
|
[[profile.default.overrides]]
|
|
filter = 'package(craft-print)'
|
|
test-group = 'print'
|
|
|
|
# The gate (`--profile ci`). Run every test and list all failures at the end, as `cargo test`
|
|
# reports a whole binary. Slow tests are named every 60 seconds; none is stopped for being slow,
|
|
# so a hang is still ended by the gate's own timeout, as before.
|
|
[profile.ci]
|
|
fail-fast = false
|
|
slow-timeout = { period = "60s" }
|
|
failure-output = "immediate-final"
|
|
|
|
# Linux and macOS (the resource audit in craft-libs#2058): every GPU consumer shares the one `gpu`
|
|
# slot, and the craft-video integration binaries share their fixture directories. Conservative on
|
|
# purpose: the in-process mutexes these tests rely on do not reach across nextest's processes.
|
|
# Windows keeps the default groups above, which its leg has passed with since it moved to nextest.
|
|
[[profile.ci.overrides]]
|
|
platform = 'cfg(unix)'
|
|
filter = 'package(craft-ui) | package(craft-keymap) | package(craft-update)'
|
|
test-group = 'gpu'
|
|
|
|
[[profile.ci.overrides]]
|
|
platform = 'cfg(unix)'
|
|
filter = 'package(craft-video) & kind(test)'
|
|
test-group = 'video-integration'
|
|
|
|
# Slowest tests first (priority runs higher values earlier), so the longest ones start at the
|
|
# beginning of the run instead of holding the tail. Every test that took over 30 s in the gate's
|
|
# run on next (run 44318177438, Linux); the first tier is the one over 60 s.
|
|
[[profile.ci.overrides]]
|
|
filter = '(package(craft-media) & test(=mxf::tests::hostile::hostile_input_never_panics)) | (package(craft-table) & test(/CellGrid.*::drives$/)) | (package(craft-proto) & test(=imap::gmail_labels_tests::a_mailbox_claimed_huge_cant_fill_memory_with_flags))'
|
|
priority = 20
|
|
|
|
[[profile.ci.overrides]]
|
|
filter = '''
|
|
(package(craft-design-lint) & test(=mapped_crates_have_no_findings))
|
|
| (package(craft-ui-widgets) & test(/SwatchTable.*::activation$/))
|
|
| (package(craft-table) & test(/CellGrid.*::activation$/))
|
|
| (package(craft-pkcs7) & test(=crypto::new_digital_ids_are_self_signed_and_survive_a_p12_round_trip))
|
|
| (package(craft-image-codecs) & test(=tiff_bands::a_blank_fax_page_wider_than_4096_px_passes_the_bomb_guard))
|
|
| (package(craft-image-codecs) & test(=codecs::png::streamed_tests::streamed_rows_match_the_whole_image_encoder))
|
|
| (package(craft-image-codecs) & test(=codecs::png::parallel_tests::the_parallel_encoder_gives_the_same_bytes_on_any_thread_count))
|
|
| (package(craft-image-codecs) & test(=limits::highly_compressible_jpeg_and_gif_still_decode))
|
|
| (package(craft-color-ui) & test(=integration::sampling::an_invalid_capture_ends_the_pick_with_a_status))
|
|
| (package(craft-docx) & test(=read::chart::tests::hostile_radar_charts_never_panic))
|
|
| (package(craft-drawingml) & test(=chart::chartex_tests::large_box_hierarchy_and_stacked_charts_take_linear_work))
|
|
| (package(craft-audio) & test(=integration::flac_decode::hostile_input_is_an_error_not_a_panic))
|
|
| (package(craft-docx) & test(=comment_save_cost::many_comments_save_without_quadratic_id_searches))
|
|
| (package(craft-ui-widgets) & test(/menu::popup::Menu.*::activation$/))
|
|
| (package(craft-scraft-format) & test(=b64::tests::size_cap_counts_the_partial_quartet))
|
|
'''
|
|
priority = 10
|