Add getter for EventHandler so its easier to mock

Test: m nothing
Change-Id: Ied338a25f12404ddc88c3b3cb7d7f2ff9ade3aab
This commit is contained in:
Liz Kammer 2023-02-13 17:55:50 -05:00
parent 58a29728ea
commit 073f69d723

View file

@ -992,7 +992,6 @@ func shouldVisitFile(c *Context, file *parser.File) (bool, []error) {
return true, []error{}
}
func (c *Context) ParseFileList(rootDir string, filePaths []string,
config interface{}) (deps []string, errs []error) {
@ -4455,6 +4454,10 @@ func (c *Context) writeAllSingletonActions(nw *ninjaWriter) error {
return nil
}
func (c *Context) GetEventHandler() *metrics.EventHandler {
return c.EventHandler
}
func (c *Context) BeginEvent(name string) {
c.EventHandler.Begin(name)
}