From a1c1bf73ec6002c752425c9e738bd493b0de2985 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Mon, 15 Aug 2022 18:27:32 +0800 Subject: [PATCH] dev-cmd/test: set `RUST_BACKTRACE` when retrying Occasionally, a new version of Rust will cause failures in dependents. See, for example, Homebrew/homebrew-core#107818. This change will allow us to get a fuller backtrace in CI, which will also make it easier to submit bug reports upstream. Without this change, recovering a full backtrace requires installing the new version of Rust and rebuilding the failing formula from source. Both these steps can be skipped if we set `RUST_BACKTRACE` when retrying a failing test. --- Library/Homebrew/dev-cmd/test.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/dev-cmd/test.rb b/Library/Homebrew/dev-cmd/test.rb index a03927cd48..042da3cbd1 100644 --- a/Library/Homebrew/dev-cmd/test.rb +++ b/Library/Homebrew/dev-cmd/test.rb @@ -119,6 +119,7 @@ module Homebrew if args.retry? && @test_failed.add?(f) oh1 "Testing #{f.full_name} (again)" f.clear_cache + ENV["RUST_BACKTRACE"] = "full" true else Homebrew.failed = true