Save list of AndroidProducts.mk files
Bug: 78020936 Test: diff out/.module_paths/AndroidProducts.mk.list with existing find results Change-Id: Ie09cc18b926b21d6d24a4cfc570686aed2893e00
This commit is contained in:
parent
ebfe33ad80
commit
567851c9cc
1 changed files with 17 additions and 2 deletions
|
@ -56,7 +56,14 @@ func NewSourceFinder(ctx Context, config Config) (f *finder.Finder) {
|
||||||
RootDirs: []string{"."},
|
RootDirs: []string{"."},
|
||||||
ExcludeDirs: []string{".git", ".repo"},
|
ExcludeDirs: []string{".git", ".repo"},
|
||||||
PruneFiles: pruneFiles,
|
PruneFiles: pruneFiles,
|
||||||
IncludeFiles: []string{"Android.mk", "Android.bp", "Blueprints", "CleanSpec.mk", "TEST_MAPPING"},
|
IncludeFiles: []string{
|
||||||
|
"Android.mk",
|
||||||
|
"AndroidProducts.mk",
|
||||||
|
"Android.bp",
|
||||||
|
"Blueprints",
|
||||||
|
"CleanSpec.mk",
|
||||||
|
"TEST_MAPPING",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
dumpDir := config.FileListDir()
|
dumpDir := config.FileListDir()
|
||||||
f, err = finder.New(cacheParams, filesystem, logger.New(ioutil.Discard),
|
f, err = finder.New(cacheParams, filesystem, logger.New(ioutil.Discard),
|
||||||
|
@ -81,8 +88,16 @@ func FindSources(ctx Context, config Config, f *finder.Finder) {
|
||||||
ctx.Fatalf("Could not export module list: %v", err)
|
ctx.Fatalf("Could not export module list: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
androidProductsMks := f.FindNamedAt("device", "AndroidProducts.mk")
|
||||||
|
androidProductsMks = append(androidProductsMks, f.FindNamedAt("vendor", "AndroidProducts.mk")...)
|
||||||
|
androidProductsMks = append(androidProductsMks, f.FindNamedAt("product", "AndroidProducts.mk")...)
|
||||||
|
err = dumpListToFile(androidProductsMks, filepath.Join(dumpDir, "AndroidProducts.mk.list"))
|
||||||
|
if err != nil {
|
||||||
|
ctx.Fatalf("Could not export product list: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
cleanSpecs := f.FindFirstNamedAt(".", "CleanSpec.mk")
|
cleanSpecs := f.FindFirstNamedAt(".", "CleanSpec.mk")
|
||||||
dumpListToFile(cleanSpecs, filepath.Join(dumpDir, "CleanSpec.mk.list"))
|
err = dumpListToFile(cleanSpecs, filepath.Join(dumpDir, "CleanSpec.mk.list"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.Fatalf("Could not export module list: %v", err)
|
ctx.Fatalf("Could not export module list: %v", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue