Add backtrace to CI

This commit is contained in:
mo8it 2026-02-26 16:20:40 +01:00
parent 8738518699
commit aaf8cad778
2 changed files with 4 additions and 1 deletions

View File

@ -37,7 +37,7 @@ jobs:
- uses: actions/checkout@v6
- uses: swatinem/rust-cache@v2
- name: cargo test
run: cargo test --workspace
run: RUST_BACKTRACE=1 cargo test --workspace
dev-check:
runs-on: ubuntu-latest
steps:

View File

@ -38,6 +38,7 @@ impl<'a> Cmd<'a> {
self
}
#[track_caller]
fn assert(&self, success: bool) {
let rustlings_bin = {
let mut path = env::current_exe().unwrap();
@ -87,11 +88,13 @@ impl<'a> Cmd<'a> {
}
#[inline]
#[track_caller]
fn success(&self) {
self.assert(true);
}
#[inline]
#[track_caller]
fn fail(&self) {
self.assert(false);
}