rust_test
`cargo test`'s `failures:` block through to the `test result:` line.
rusttesttoolmatcher
Install: ci-doctor matchers add official/rust_test
matchers/rust/rust_test/matcher.yaml
id: rust_testrole: toolclassification: [rust, test]description: '`cargo test`''s `failures:` block through to the `test result:` line.'start: ^failures:$end: '^test result:'
In bundles
Fixtures
Framing stripped per provider. Highlighted lines are what this matcher selects; the marked line is the anchor.
rust_test_failureOpen in playground
1Current runner version: '2.336.0'
2##[group]Operating System
3Ubuntu
424.04.4
5LTS
6##[endgroup]
7Secret source: Actions
8Prepare workflow directory
9Prepare all required actions
10Complete job name: rust_test_failure
11##[group]Set up job
12Image: ubuntu-24.04
13Runner name: 'GitHub Actions 12'
14##[endgroup]
15Download action repository 'actions/checkout@v4'
16Download action repository 'actions/cache@v4'
17##[group]Run actions/checkout@v4
18 with:
19 fetch-depth: 20
20 lfs: false
21##[endgroup]
22Syncing repository: acme/ledger
23##[group]Getting Git version info
24Working directory is '/home/runner/work/ledger/ledger'
25##[endgroup]
26/usr/bin/git checkout --progress --force 8ad41f02
27##[group]Run actions/cache@v4
28 with:
29 path: ~/.cache
30 key: Linux-deps-8ad41f02
31##[endgroup]
32Received 41943040 of 41943040 (100.0%), 40.0 MBs/sec
33Cache restored from key: Linux-deps-8ad41f02
34##[group]Run cargo --version
35cargo --version
36cargo build --locked
37cargo test --locked
38shell: /usr/bin/bash -e {0}
39##[endgroup]
40cargo 1.79.0 (ffa9cf99a 2024-06-03)
41 Compiling ledger v0.4.1 (/builds/team/ledger)
42 Finished dev [unoptimized + debuginfo] target(s) in 21.44s
43 Compiling ledger v0.4.1 (/builds/team/ledger)
44 Finished test [unoptimized + debuginfo] target(s) in 18.02s
45 Running unittests src/lib.rs (target/debug/deps/ledger-3c7b1a9d)
46
47running 24 tests
48test balance::tests::zero_balance ... ok
49test balance::tests::credit_then_debit ... ok
50test posting::tests::rejects_future_date ... ok
51test posting::tests::rounds_half_even ... ok
52test posting::tests::applies_fx_rate ... FAILED
53
54failures:
55
56---- posting::tests::applies_fx_rate stdout ----
57thread 'posting::tests::applies_fx_rate' panicked at src/posting.rs:212:9:
58assertion `left == right` failed: fx conversion lost precision
59 left: 10499
60 right: 10500
61note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
62
63failures:
64 posting::tests::applies_fx_rate
65
66test result: FAILED. 23 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.31s
67
68error: test failed, to rerun pass `--lib`
69##[error]Process completed with exit code 101.
70##[group]Post Run actions/checkout@v4
71##[endgroup]
72/usr/bin/git version
73git version 2.54.0
74##[group]Post Run actions/upload-artifact@v4
75##[endgroup]
76Artifact upload complete.
77##[warning]target/nextest/: no matching files. Ensure that the artifact path is relative to the working directory
78Post job cleanup.
79Cleaning up orphan processes
1Running with gitlab-runner 16.11.0 (a1b2c3d4)
2 on rust-runner-02 Rs9Tk3Lm, system ID: s_ff11223344aa
3Preparing the "docker" executor
4 Using Docker executor with image rust:1.79-slim ...
5Using Docker executor with image rust:1.79-slim ...
6Using docker image sha256:aa11bb22cc33 for rust:1.79-slim with digest rust@sha256:9f8e...
7Preparing environment
8Running on runner-rs9tk3lm-project-42-concurrent-0...
9Fetching changes with git depth set to 20...
10Checking out 8ad41f02 as detached HEAD...
11Checking cache for cargo-registry-1.79...
12Successfully extracted cache
13$ cargo --version
14cargo 1.79.0 (ffa9cf99a 2024-06-03)
15$ cargo build --locked
16 Compiling ledger v0.4.1 (/builds/team/ledger)
17 Finished dev [unoptimized + debuginfo] target(s) in 21.44s
18$ cargo test --locked
19 Compiling ledger v0.4.1 (/builds/team/ledger)
20 Finished test [unoptimized + debuginfo] target(s) in 18.02s
21 Running unittests src/lib.rs (target/debug/deps/ledger-3c7b1a9d)
22
23running 24 tests
24test balance::tests::zero_balance ... ok
25test balance::tests::credit_then_debit ... ok
26test posting::tests::rejects_future_date ... ok
27test posting::tests::rounds_half_even ... ok
28test posting::tests::applies_fx_rate ... FAILED
29
30failures:
31
32---- posting::tests::applies_fx_rate stdout ----
33thread 'posting::tests::applies_fx_rate' panicked at src/posting.rs:212:9:
34assertion `left == right` failed: fx conversion lost precision
35 left: 10499
36 right: 10500
37note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
38
39failures:
40 posting::tests::applies_fx_rate
41
42test result: FAILED. 23 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.31s
43
44error: test failed, to rerun pass `--lib`
45Running after_script
46$ echo "tests failed, skipping publish"
47tests failed, skipping publish
48Uploading artifacts for failed job
49WARNING: target/nextest/: no matching files. Ensure that the artifact path is relative to the working directory
50ERROR: Job failed: exit code 101