diff --git a/test/e2e/framework/log/logger_test.go b/test/e2e/framework/log/logger_test.go index 469a61c5c7d..76439c06298 100644 --- a/test/e2e/framework/log/logger_test.go +++ b/test/e2e/framework/log/logger_test.go @@ -148,8 +148,9 @@ func stripAddresses(in string) string { return instanceAddr.ReplaceAllString(in, ">") } -// stackLocation matches "\t//.go:75 +0x1f1". -var stackLocation = regexp.MustCompile(`/.*/([[:^space:]]+.go:[[:digit:]]+)( \+0x[0-9a-fA-F]+)?`) +// stackLocation matches "/.go:75 +0x1f1" after a slash (built +// locally) or one of a few relative paths (built in the Kubernetes CI). +var stackLocation = regexp.MustCompile(`(?:/|vendor/|test/|GOROOT/).*/([[:^space:]]+.go:[[:digit:]]+)( \+0x[0-9a-fA-F]+)?`) // functionArgs matches "(...)". var functionArgs = regexp.MustCompile(`([[:alpha:]]+)\(.*\)`)