Merge "Add --skip-soong-tests argument to soong_ui and use it in multiproduct_kati"

This commit is contained in:
Treehugger Robot 2020-11-02 21:31:31 +00:00 committed by Gerrit Code Review
commit d3e294d8ac
3 changed files with 18 additions and 8 deletions

View File

@ -412,7 +412,9 @@ func buildProduct(mpctx *mpContext, product string) {
ctx.Status.AddOutput(terminal.NewStatusOutput(ctx.Writer, "", false,
build.OsEnvironment().IsEnvTrue("ANDROID_QUIET_BUILD")))
config := build.NewConfig(ctx, flag.Args()...)
args := append([]string(nil), flag.Args()...)
args = append(args, "--skip-soong-tests")
config := build.NewConfig(ctx, args...)
config.Environment().Set("OUT_DIR", outDir)
if !*keepArtifacts {
config.Environment().Set("EMPTY_NINJA_FILE", "true")

View File

@ -41,12 +41,13 @@ type configImpl struct {
buildDateTime string
// From the arguments
parallel int
keepGoing int
verbose bool
checkbuild bool
dist bool
skipMake bool
parallel int
keepGoing int
verbose bool
checkbuild bool
dist bool
skipMake bool
skipSoongTests bool
// From the product config
katiArgs []string
@ -526,6 +527,8 @@ func (c *configImpl) parseArgs(ctx Context, args []string) {
c.verbose = true
} else if arg == "--skip-make" {
c.skipMake = true
} else if arg == "--skip-soong-tests" {
c.skipSoongTests = true
} else if len(arg) > 0 && arg[0] == '-' {
parseArgNum := func(def int) int {
if len(arg) > 2 {

View File

@ -38,7 +38,12 @@ func runSoong(ctx Context, config Config) {
ctx.BeginTrace(metrics.RunSoong, "blueprint bootstrap")
defer ctx.EndTrace()
cmd := Command(ctx, config, "blueprint bootstrap", "build/blueprint/bootstrap.bash", "-t", "-n")
args := []string{"-n"}
if !config.skipSoongTests {
args = append(args, "-t")
}
cmd := Command(ctx, config, "blueprint bootstrap", "build/blueprint/bootstrap.bash", args...)
cmd.Environment.Set("BLUEPRINTDIR", "./build/blueprint")
cmd.Environment.Set("BOOTSTRAP", "./build/blueprint/bootstrap.bash")
cmd.Environment.Set("BUILDDIR", config.SoongOutDir())