Skip to content

Commit

Permalink
chore: Capture backtraces when running the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
klochowicz committed Jul 10, 2023
1 parent 6c75d6d commit 39343ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
- name: Generate FFI bindings
run: just gen
- name: Running cargo tests
run: cargo test
run: RUST_BACKTRACE=1 cargo test
- name: Running flutter tests
run: just flutter-test

Expand All @@ -117,7 +117,7 @@ jobs:
run: |
curl -d '{"address":"bcrt1qylgu6ffkp3p0m8tw8kp4tt2dmdh755f4r5dq7s", "amount":"0.1"}' -H "Content-Type: application/json" -X POST http://localhost:3000/faucet
- name: Run slow tests
run: cargo test -p ln-dlc-node -- --ignored --nocapture --test-threads=1
run: RUST_BACKTRACE=1 cargo test -p ln-dlc-node -- --ignored --nocapture --test-threads=1

e2e-tests:
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ ln-dlc-node-test args="": docker
sleep 2
# adjust the max amount of available file descriptors - we're making a lot of requests, and it might go over the limit
ulimit -n 1024
cargo test -p ln-dlc-node -- --ignored --test-threads=1 {{args}}
RUST_BACKTRACE=1 cargo test -p ln-dlc-node -- --ignored --test-threads=1 {{args}}

# Runs background Docker services
docker:
Expand Down Expand Up @@ -354,12 +354,12 @@ alias e2e := tests-e2e
tests-e2e args="": services
#!/usr/bin/env bash
set -euxo pipefail
cargo test -p tests-e2e -- --ignored --test-threads=1 {{args}}
RUST_BACKTRACE=1 cargo test -p tests-e2e -- --ignored --test-threads=1 {{args}}
# Run a single end-to-end test for debugging purposes
e2e-single test_name="": services
#!/usr/bin/env bash
set -euxo pipefail
cargo test -p tests-e2e --test {{test_name}} -- --ignored --nocapture
RUST_BACKTRACE=1 cargo test -p tests-e2e --test {{test_name}} -- --ignored --nocapture
# vim:expandtab:sw=4:ts=4

0 comments on commit 39343ef

Please sign in to comment.