Add --skip-soong-tests argument to soong_ui and use it in multiproduct_kati
There is no need for multiproduct_kati to run the tests for every product, they don't vary by product config. --skip-soong-tests can also be used for local development to run soong_build even if the tests don't pass. Bug: 156428456 Test: m --skip-soong-tests nothing Change-Id: I9c00e3d1b6e51d17bb290339c3f124d4d1c9e69f
This commit is contained in:
@@ -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")
|
||||
|
@@ -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 {
|
||||
|
@@ -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())
|
||||
|
Reference in New Issue
Block a user