mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 18:31:15 +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
|
i += 2
|
||||||
}
|
}
|
||||||
|
|
||||||
// filenames have `/go/src/k8s.io` prefix which dont exist locally
|
// filenames are in one of two special GOPATHs depending on if they were
|
||||||
for i, v := range frames {
|
// built dockerized or with the host go
|
||||||
frames[i].File = strings.Replace(v.File,
|
// we want to trim this prefix to produce portable relative paths
|
||||||
"/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes",
|
k8sSRC := *k8sPath + "/_output/local/go/src/k8s.io/kubernetes/"
|
||||||
*k8sPath, 1)
|
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 {
|
for _, curFrame := range frames {
|
||||||
|
Loading…
Reference in New Issue
Block a user