mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +00:00
fix generated conformance filepaths when test binary is not stripped
This commit is contained in:
parent
c1c3fdefe3
commit
ed09168e8a
@ -209,11 +209,14 @@ func getConformanceDataFromStackTrace(fullstackstrace string) (*ConformanceData,
|
||||
i += 2
|
||||
}
|
||||
|
||||
// filenames have `/go/src/k8s.io` prefix which dont exist locally
|
||||
for i, v := range frames {
|
||||
frames[i].File = strings.Replace(v.File,
|
||||
"/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes",
|
||||
*k8sPath, 1)
|
||||
// filenames are in one of two special GOPATHs depending on if they were
|
||||
// built dockerized or with the host go
|
||||
// we want to trim this prefix to produce portable relative paths
|
||||
k8sSRC := *k8sPath + "/_output/local/go/src/k8s.io/kubernetes/"
|
||||
for i := range frames {
|
||||
trimmedFile := strings.TrimPrefix(frames[i].File, k8sSRC)
|
||||
trimmedFile = strings.TrimPrefix(trimmedFile, "/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/")
|
||||
frames[i].File = trimmedFile
|
||||
}
|
||||
|
||||
for _, curFrame := range frames {
|
||||
|
Loading…
Reference in New Issue
Block a user