This commit is contained in:
Adam Majer 2024-08-16 14:34:42 +02:00
parent 0b18e32fe0
commit ed135c4139

View File

@ -135,8 +135,8 @@ func processBuildStatus(h *common.RequestHandler, project, refProject *common.Bu
h.Log("comparing results %d vs. ref %d", len(project.Result), len(refProject.Result))
done:
for i := 0; i < len(project.Result); i++ {
j := 0
h.Log("searching for %s/%s", project.Result[i].Repository, project.Result[i].Arch)
j := 0
for ; j < len(refProject.Result); j++ {
if project.Result[i].Repository != refProject.Result[j].Repository ||
project.Result[i].Arch != refProject.Result[j].Arch {
@ -147,7 +147,7 @@ done:
res := processRepoBuildStatus(h, project.Result[i].Status, refProject.Result[j].Status)
switch res {
case BuildStatusSummarySuccess:
if i-1 == len(project.Result) {
if i == len(project.Result)-1 {
break done
}
break
@ -156,6 +156,7 @@ done:
}
}
h.Log("%d", j)
if j >= len(refProject.Result) {
h.LogError("Cannot find results... %#v \n %#v\n", project.Result[i], refProject.Result)
return BuildStatusSummaryUnknown