From 1db36e38884d50b9e67a948c387ab9623593695f Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Thu, 25 Jul 2024 12:42:47 -0700 Subject: [PATCH] Update tests to expect RBE not supported on linux. Bug: 354280127 Test: Passes on linux Test: Treehugger for the rest. Change-Id: Ic1546a153e7e761a2132409743650cbf0a0b1ba6 --- ui/build/config_test.go | 4 +++- ui/build/rbe_test.go | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ui/build/config_test.go b/ui/build/config_test.go index b1222fe93..b42edb0c6 100644 --- a/ui/build/config_test.go +++ b/ui/build/config_test.go @@ -22,6 +22,7 @@ import ( "os" "path/filepath" "reflect" + "runtime" "strings" "testing" @@ -1043,12 +1044,13 @@ func TestBuildConfig(t *testing.T) { }, }, { + // RBE is only supported on linux. name: "use rbe", environ: Environment{"USE_RBE=1"}, expectedBuildConfig: &smpb.BuildConfig{ ForceUseGoma: proto.Bool(false), UseGoma: proto.Bool(false), - UseRbe: proto.Bool(true), + UseRbe: proto.Bool(runtime.GOOS == "linux"), NinjaWeightListSource: smpb.BuildConfig_NOT_USED.Enum(), }, }, diff --git a/ui/build/rbe_test.go b/ui/build/rbe_test.go index 266f76b35..d1b8e2644 100644 --- a/ui/build/rbe_test.go +++ b/ui/build/rbe_test.go @@ -19,6 +19,7 @@ import ( "io/ioutil" "os" "path/filepath" + "runtime" "strings" "testing" @@ -26,6 +27,10 @@ import ( ) func TestDumpRBEMetrics(t *testing.T) { + // RBE is only supported on linux. + if runtime.GOOS != "linux" { + t.Skip("RBE is only supported on linux") + } ctx := testContext() tests := []struct { description string @@ -82,6 +87,10 @@ func TestDumpRBEMetrics(t *testing.T) { } func TestDumpRBEMetricsErrors(t *testing.T) { + // RBE is only supported on linux. + if runtime.GOOS != "linux" { + t.Skip("RBE is only supported on linux") + } ctx := testContext() tests := []struct { description string