Run the Finder and make its results available to Kati
The Finder runs roughly 200ms faster than findleaves.py in aosp,
and runs roughly 400ms faster in internal master.
Bug: 64363847
Test: m -j
Change-Id: I62db8dacc90871e913576fe2443021fb1749a483
diff --git a/finder/finder_test.go b/finder/finder_test.go
index 15c3728..8d1bbd7 100644
--- a/finder/finder_test.go
+++ b/finder/finder_test.go
@@ -466,12 +466,13 @@
create(t, "/cwd/hi.txt", filesystem)
create(t, "/cwd/a/hi.txt", filesystem)
create(t, "/cwd/a/a/hi.txt", filesystem)
+ create(t, "/rel/a/hi.txt", filesystem)
finder := newFinder(
t,
filesystem,
CacheParams{
- RootDirs: []string{"/cwd", "/tmp/include"},
+ RootDirs: []string{"/cwd", "../rel", "/tmp/include"},
IncludeFiles: []string{"hi.txt"},
},
)
@@ -491,6 +492,10 @@
"a/hi.txt",
"a/a/hi.txt"})
+ foundPaths = finder.FindNamedAt("/rel", "hi.txt")
+ assertSameResponse(t, foundPaths,
+ []string{"/rel/a/hi.txt"})
+
foundPaths = finder.FindNamedAt("/tmp/include", "hi.txt")
assertSameResponse(t, foundPaths, []string{"/tmp/include/hi.txt"})
}