From 106d6ef45993d98369c8d1a72387f3ca28496faa Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 24 Oct 2023 10:34:56 -0700 Subject: [PATCH] Disable Soong tests by default on Linux Disable running the Soong tests when building on Linux. The tests are still enabled when running on Darwin to ensure we have test on Darwin in CI. Checkbuilds still depend on the tests, which will provide test coverage in CI on Linux. Bug: 269296618 Test: aninja -t path checkbuild out/host/linux-x86/bin/go/soong-java/test/test.passed Test: m nothing Change-Id: Ib8359ff6d2a92eeb2ac9a9e95ecd65abc4e40061 --- ui/build/config.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ui/build/config.go b/ui/build/config.go index 5925b283c..17a837ece 100644 --- a/ui/build/config.go +++ b/ui/build/config.go @@ -240,6 +240,11 @@ func NewConfig(ctx Context, args ...string) Config { ninjaWeightListSource: DEFAULT, } + // Skip soong tests by default on Linux + if runtime.GOOS == "linux" { + ret.skipSoongTests = true + } + // Default matching ninja ret.parallel = runtime.NumCPU() + 2 ret.keepGoing = 1 @@ -772,6 +777,8 @@ func (c *configImpl) parseArgs(ctx Context, args []string) { c.skipConfig = true } else if arg == "--skip-soong-tests" { c.skipSoongTests = true + } else if arg == "--no-skip-soong-tests" { + c.skipSoongTests = false } else if arg == "--skip-metrics-upload" { c.skipMetricsUpload = true } else if arg == "--mk-metrics" {