Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a366e48b authored by Mark Dacek's avatar Mark Dacek Committed by Gerrit Code Review
Browse files

Merge "Add skip-metrics-upload flag to soong_ui."

parents 41ec4e65 d0e7cd3d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -215,7 +215,11 @@ func main() {
			soongMetricsFile,         // high level metrics related to this build system.
			config.BazelMetricsDir(), // directory that contains a set of bazel metrics.
		}

		if !config.SkipMetricsUpload() {
			defer build.UploadMetrics(buildCtx, config, c.simpleOutput, buildStarted, files...)
		}

		defer met.Dump(soongMetricsFile)
		defer build.CheckProdCreds(buildCtx, config)
	}
+25 −18
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ type configImpl struct {
	skipNinja         bool
	skipSoongTests    bool
	searchApiDir      bool // Scan the Android.bp files generated in out/api_surfaces
	skipMetricsUpload bool

	// From the product config
	katiArgs        []string
@@ -735,6 +736,8 @@ func (c *configImpl) parseArgs(ctx Context, args []string) {
			c.skipConfig = true
		} else if arg == "--skip-soong-tests" {
			c.skipSoongTests = true
		} else if arg == "--skip-metrics-upload" {
			c.skipMetricsUpload = true
		} else if arg == "--mk-metrics" {
			c.reportMkMetrics = true
		} else if arg == "--bazel-mode" {
@@ -1512,6 +1515,10 @@ func (c *configImpl) BazelModulesForceEnabledByFlag() string {
	return c.bazelForceEnabledModules
}

func (c *configImpl) SkipMetricsUpload() bool {
	return c.skipMetricsUpload
}

func GetMetricsUploader(topDir string, env *Environment) string {
	if p, ok := env.Get("METRICS_UPLOADER"); ok {
		metricsUploader := filepath.Join(topDir, p)