Loading ui/build/config.go +4 −1 Original line number Diff line number Diff line Loading @@ -355,13 +355,16 @@ func storeConfigMetrics(ctx Context, config Config) { } func buildConfig(config Config) *smpb.BuildConfig { return &smpb.BuildConfig{ c := &smpb.BuildConfig{ ForceUseGoma: proto.Bool(config.ForceUseGoma()), UseGoma: proto.Bool(config.UseGoma()), UseRbe: proto.Bool(config.UseRBE()), BazelAsNinja: proto.Bool(config.UseBazel()), BazelMixedBuild: proto.Bool(config.bazelBuildMode() == mixedBuild), } c.Targets = append(c.Targets, config.arguments...) return c } // getConfigArgs processes the command arguments based on the build action and creates a set of new Loading ui/build/config_test.go +18 −2 Original line number Diff line number Diff line Loading @@ -1003,6 +1003,7 @@ func TestBuildConfig(t *testing.T) { tests := []struct { name string environ Environment arguments []string useBazel bool expectedBuildConfig *smpb.BuildConfig }{ Loading Loading @@ -1073,6 +1074,20 @@ func TestBuildConfig(t *testing.T) { BazelMixedBuild: proto.Bool(true), }, }, { name: "specified targets", environ: Environment{}, useBazel: true, arguments: []string{"droid", "dist"}, expectedBuildConfig: &smpb.BuildConfig{ ForceUseGoma: proto.Bool(false), UseGoma: proto.Bool(false), UseRbe: proto.Bool(false), BazelAsNinja: proto.Bool(true), BazelMixedBuild: proto.Bool(false), Targets: []string{"droid", "dist"}, }, }, { name: "all set", environ: Environment{ Loading @@ -1097,6 +1112,7 @@ func TestBuildConfig(t *testing.T) { c := &configImpl{ environ: &tc.environ, useBazel: tc.useBazel, arguments: tc.arguments, } config := Config{c} actualBuildConfig := buildConfig(config) Loading ui/metrics/metrics_proto/metrics.pb.go +108 −96 File changed.Preview size limit exceeded, changes collapsed. Show changes ui/metrics/metrics_proto/metrics.proto +4 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,10 @@ message BuildConfig { // Whether build is occurring in a mixed build mode, where Bazel maintains the // definition and build of some modules in cooperation with Soong. optional bool bazel_mixed_build = 5; // These are the targets soong passes to ninja, these targets include special // targets such as droid as well as the regular build targets. repeated string targets = 6; } message SystemResourceInfo { Loading Loading
ui/build/config.go +4 −1 Original line number Diff line number Diff line Loading @@ -355,13 +355,16 @@ func storeConfigMetrics(ctx Context, config Config) { } func buildConfig(config Config) *smpb.BuildConfig { return &smpb.BuildConfig{ c := &smpb.BuildConfig{ ForceUseGoma: proto.Bool(config.ForceUseGoma()), UseGoma: proto.Bool(config.UseGoma()), UseRbe: proto.Bool(config.UseRBE()), BazelAsNinja: proto.Bool(config.UseBazel()), BazelMixedBuild: proto.Bool(config.bazelBuildMode() == mixedBuild), } c.Targets = append(c.Targets, config.arguments...) return c } // getConfigArgs processes the command arguments based on the build action and creates a set of new Loading
ui/build/config_test.go +18 −2 Original line number Diff line number Diff line Loading @@ -1003,6 +1003,7 @@ func TestBuildConfig(t *testing.T) { tests := []struct { name string environ Environment arguments []string useBazel bool expectedBuildConfig *smpb.BuildConfig }{ Loading Loading @@ -1073,6 +1074,20 @@ func TestBuildConfig(t *testing.T) { BazelMixedBuild: proto.Bool(true), }, }, { name: "specified targets", environ: Environment{}, useBazel: true, arguments: []string{"droid", "dist"}, expectedBuildConfig: &smpb.BuildConfig{ ForceUseGoma: proto.Bool(false), UseGoma: proto.Bool(false), UseRbe: proto.Bool(false), BazelAsNinja: proto.Bool(true), BazelMixedBuild: proto.Bool(false), Targets: []string{"droid", "dist"}, }, }, { name: "all set", environ: Environment{ Loading @@ -1097,6 +1112,7 @@ func TestBuildConfig(t *testing.T) { c := &configImpl{ environ: &tc.environ, useBazel: tc.useBazel, arguments: tc.arguments, } config := Config{c} actualBuildConfig := buildConfig(config) Loading
ui/metrics/metrics_proto/metrics.pb.go +108 −96 File changed.Preview size limit exceeded, changes collapsed. Show changes
ui/metrics/metrics_proto/metrics.proto +4 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,10 @@ message BuildConfig { // Whether build is occurring in a mixed build mode, where Bazel maintains the // definition and build of some modules in cooperation with Soong. optional bool bazel_mixed_build = 5; // These are the targets soong passes to ninja, these targets include special // targets such as droid as well as the regular build targets. repeated string targets = 6; } message SystemResourceInfo { Loading