mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
e2e logger test: handle paths in Kubernetes CI
Source code paths during //test/e2e/framework/log:go_default_test in the Kubernetes CI start with relative paths. To avoid too broad matching of the regex, those paths that occur in practice are named explicitly as alternatives to the leading slash.
This commit is contained in:
parent
f021d6590e
commit
cdaba2bea3
@ -148,8 +148,9 @@ func stripAddresses(in string) string {
|
||||
return instanceAddr.ReplaceAllString(in, ">")
|
||||
}
|
||||
|
||||
// stackLocation matches "\t/<some path>/<file>.go:75 +0x1f1".
|
||||
var stackLocation = regexp.MustCompile(`/.*/([[:^space:]]+.go:[[:digit:]]+)( \+0x[0-9a-fA-F]+)?`)
|
||||
// stackLocation matches "<some path>/<file>.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 "<function name>(...)".
|
||||
var functionArgs = regexp.MustCompile(`([[:alpha:]]+)\(.*\)`)
|
||||
|
Loading…
Reference in New Issue
Block a user