diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-02-13 15:34:21 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-02-13 15:55:58 +0000 |
| commit | 2d6800b3aacc3b8ea223fc92ae7db1e2ae868109 (patch) | |
| tree | a8ad887f2ce164cccba6b0e404ad2fb356cf74e0 /test_utils | |
| parent | cf319efc6dcdc6c54564cb84e13218edbf3643fa (diff) | |
test: fix backtrace display
between 5 Feb 2024 and 13 Feb 2024 backtrace began activiating in
`nix-shell` and ci during integration tests when rexpect.
this caused some error tests to fail / hang
it was not activating in the `nix-shell` when the cli
was called seperately
setting the `RUST_BACKTRACE=0` in the rexpect config surpresses
the backtrace as desired
Diffstat (limited to 'test_utils')
| -rw-r--r-- | test_utils/src/lib.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test_utils/src/lib.rs b/test_utils/src/lib.rs index 8128e98..0e34983 100644 --- a/test_utils/src/lib.rs +++ b/test_utils/src/lib.rs | |||
| @@ -770,6 +770,7 @@ where | |||
| 770 | { | 770 | { |
| 771 | let mut cmd = std::process::Command::new(assert_cmd::cargo::cargo_bin("ngit")); | 771 | let mut cmd = std::process::Command::new(assert_cmd::cargo::cargo_bin("ngit")); |
| 772 | cmd.env("NGITTEST", "TRUE"); | 772 | cmd.env("NGITTEST", "TRUE"); |
| 773 | cmd.env("RUST_BACKTRACE", "0"); | ||
| 773 | cmd.args(args); | 774 | cmd.args(args); |
| 774 | // using branch for PR https://github.com/rust-cli/rexpect/pull/103 to strip ansi escape codes | 775 | // using branch for PR https://github.com/rust-cli/rexpect/pull/103 to strip ansi escape codes |
| 775 | rexpect::session::spawn_with_options( | 776 | rexpect::session::spawn_with_options( |
| @@ -792,6 +793,7 @@ where | |||
| 792 | { | 793 | { |
| 793 | let mut cmd = std::process::Command::new(assert_cmd::cargo::cargo_bin("ngit")); | 794 | let mut cmd = std::process::Command::new(assert_cmd::cargo::cargo_bin("ngit")); |
| 794 | cmd.env("NGITTEST", "TRUE"); | 795 | cmd.env("NGITTEST", "TRUE"); |
| 796 | cmd.env("RUST_BACKTRACE", "0"); | ||
| 795 | cmd.current_dir(dir); | 797 | cmd.current_dir(dir); |
| 796 | cmd.args(args); | 798 | cmd.args(args); |
| 797 | // using branch for PR https://github.com/rust-cli/rexpect/pull/103 to strip ansi escape codes | 799 | // using branch for PR https://github.com/rust-cli/rexpect/pull/103 to strip ansi escape codes |