Skip to content

Commit aaf8cad

Browse files
committed
Add backtrace to CI
1 parent 8738518 commit aaf8cad

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- uses: actions/checkout@v6
3838
- uses: swatinem/rust-cache@v2
3939
- name: cargo test
40-
run: cargo test --workspace
40+
run: RUST_BACKTRACE=1 cargo test --workspace
4141
dev-check:
4242
runs-on: ubuntu-latest
4343
steps:

tests/integration_tests.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ impl<'a> Cmd<'a> {
3838
self
3939
}
4040

41+
#[track_caller]
4142
fn assert(&self, success: bool) {
4243
let rustlings_bin = {
4344
let mut path = env::current_exe().unwrap();
@@ -87,11 +88,13 @@ impl<'a> Cmd<'a> {
8788
}
8889

8990
#[inline]
91+
#[track_caller]
9092
fn success(&self) {
9193
self.assert(true);
9294
}
9395

9496
#[inline]
97+
#[track_caller]
9598
fn fail(&self) {
9699
self.assert(false);
97100
}

0 commit comments

Comments
 (0)