Merge "multiproduct_kati: Support skipping known-broken products"

This commit is contained in:
Treehugger Robot 2017-10-07 00:38:27 +00:00 committed by Gerrit Code Review
commit 29b41ed830
1 changed files with 23 additions and 2 deletions

View File

@ -55,6 +55,8 @@ var onlySoong = flag.Bool("only-soong", false, "Only run product config and Soon
var buildVariant = flag.String("variant", "eng", "build variant to use")
var skipProducts = flag.String("skip-products", "", "comma-separated list of products to skip (known failures, etc)")
const errorLeadingLines = 20
const errorTrailingLines = 20
@ -225,8 +227,27 @@ func main() {
if err != nil {
log.Fatal(err)
}
products := strings.Fields(vars["all_named_products"])
log.Verbose("Got product list:", products)
productsList := strings.Fields(vars["all_named_products"])
products := make([]string, 0, len(productsList))
skipList := strings.Split(*skipProducts, ",")
skipProduct := func(p string) bool {
for _, s := range skipList {
if p == s {
return true
}
}
return false
}
for _, product := range productsList {
if !skipProduct(product) {
products = append(products, product)
} else {
log.Verbose("Skipping: ", product)
}
}
log.Verbose("Got product list: ", products)
status.SetTotal(len(products))