Skip to content

Commit 980264e

Browse files
committed
allow subpackages in heuristic for determining which packages to highlight in a progres report
1 parent f3b27ba commit 980264e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Diff for: internal/progress_reporter.go

+10-1
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,15 @@ func NewProgressReport(report types.SpecReport, currentNode Node, currentNodeSta
183183
packagesOfInterest[packageFromFilename(filename)] = true
184184
}
185185
}
186+
isPackageOfInterest := func(filename string) bool {
187+
stackPackage := packageFromFilename(filename)
188+
for packageOfInterest := range packagesOfInterest {
189+
if strings.HasPrefix(stackPackage, packageOfInterest) {
190+
return true
191+
}
192+
}
193+
return false
194+
}
186195
for _, location := range report.ContainerHierarchyLocations {
187196
addPackageFor(location.FileName)
188197
}
@@ -227,7 +236,7 @@ OUTER:
227236
isGinkgoEntryPoint = true
228237
break
229238
}
230-
if packagesOfInterest[packageFromFilename(functionCall.Filename)] {
239+
if isPackageOfInterest(functionCall.Filename) {
231240
goroutine.Stack[functionCallIdx].Highlight = true
232241
hasHighlights = true
233242
}

0 commit comments

Comments
 (0)