buildIndex walks root and returns a populated Index, the same way Engine.AddRoot does but without starting a watcher.
(t testing.TB, root string)
| 77 | // buildIndex walks root and returns a populated Index, the same |
| 78 | // way Engine.AddRoot does but without starting a watcher. |
| 79 | func buildIndex(t testing.TB, root string) *filefinder.Index { |
| 80 | t.Helper() |
| 81 | absRoot, err := filepath.Abs(root) |
| 82 | require.NoError(t, err) |
| 83 | idx, err := filefinder.BuildTestIndex(absRoot) |
| 84 | require.NoError(t, err) |
| 85 | return idx |
| 86 | } |
| 87 | |
| 88 | func BenchmarkBuildIndex(b *testing.B) { |
| 89 | scales := []struct { |
no test coverage detected