diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2025-09-26 15:24:20 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-10-01 14:41:08 +0000 |
| commit | 12039a0e63377e86fa1b5adc3d327d6e07f23a32 (patch) | |
| tree | 0d622daed4041159362850994ab81d8ce351cbff /pkg/cover | |
| parent | db09e5b2322f6dbd902a69405c2142617c6b8715 (diff) | |
pkg/osutil: make VerboseError nest other errors
After this change it fits more naturally into the Go's error
functionality.
Diffstat (limited to 'pkg/cover')
| -rw-r--r-- | pkg/cover/report_test.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/cover/report_test.go b/pkg/cover/report_test.go index 96b634cc6..c3d3231fb 100644 --- a/pkg/cover/report_test.go +++ b/pkg/cover/report_test.go @@ -11,6 +11,7 @@ import ( "bytes" "encoding/csv" "encoding/json" + "errors" "fmt" "os" "path/filepath" @@ -283,7 +284,8 @@ func buildTestBinary(t *testing.T, target *targets.Target, test *Test, dir strin } if _, err := osutil.RunCmd(time.Hour, "", target.CCompiler, ldflags...); err != nil { // Arm linker in the env image has a bug when linking a clang-produced files. - if regexp.MustCompile(`arm-linux-gnueabi.* assertion fail`).MatchString(err.Error()) { + var vErr *osutil.VerboseError + if errors.As(err, &vErr) && regexp.MustCompile(`arm-linux-gnueabi.* assertion fail`).Match(vErr.Output) { t.Skipf("skipping test, broken arm linker (%v)", err) } t.Fatal(err) |
