Merge "Update tests to expect RBE not supported on linux." into main
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
@@ -1043,12 +1044,13 @@ func TestBuildConfig(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
// RBE is only supported on linux.
|
||||||
name: "use rbe",
|
name: "use rbe",
|
||||||
environ: Environment{"USE_RBE=1"},
|
environ: Environment{"USE_RBE=1"},
|
||||||
expectedBuildConfig: &smpb.BuildConfig{
|
expectedBuildConfig: &smpb.BuildConfig{
|
||||||
ForceUseGoma: proto.Bool(false),
|
ForceUseGoma: proto.Bool(false),
|
||||||
UseGoma: proto.Bool(false),
|
UseGoma: proto.Bool(false),
|
||||||
UseRbe: proto.Bool(true),
|
UseRbe: proto.Bool(runtime.GOOS == "linux"),
|
||||||
NinjaWeightListSource: smpb.BuildConfig_NOT_USED.Enum(),
|
NinjaWeightListSource: smpb.BuildConfig_NOT_USED.Enum(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@@ -19,6 +19,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
@@ -26,6 +27,10 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestDumpRBEMetrics(t *testing.T) {
|
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()
|
ctx := testContext()
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
description string
|
description string
|
||||||
@@ -82,6 +87,10 @@ func TestDumpRBEMetrics(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestDumpRBEMetricsErrors(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()
|
ctx := testContext()
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
description string
|
description string
|
||||||
|
Reference in New Issue
Block a user