Merge "Fix tests with cc_binary_host on mac"
This commit is contained in:
@@ -198,6 +198,14 @@ func saveToConfigFile(config jsonConfigurable, filename string) error {
|
|||||||
|
|
||||||
// TestConfig returns a Config object suitable for using for tests
|
// TestConfig returns a Config object suitable for using for tests
|
||||||
func TestConfig(buildDir string, env map[string]string) Config {
|
func TestConfig(buildDir string, env map[string]string) Config {
|
||||||
|
envCopy := make(map[string]string)
|
||||||
|
for k, v := range env {
|
||||||
|
envCopy[k] = v
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy the real PATH value to the test environment, it's needed by HostSystemTool() used in x86_darwin_host.go
|
||||||
|
envCopy["PATH"] = originalEnv["PATH"]
|
||||||
|
|
||||||
config := &config{
|
config := &config{
|
||||||
productVariables: productVariables{
|
productVariables: productVariables{
|
||||||
DeviceName: stringPtr("test_device"),
|
DeviceName: stringPtr("test_device"),
|
||||||
@@ -212,7 +220,7 @@ func TestConfig(buildDir string, env map[string]string) Config {
|
|||||||
|
|
||||||
buildDir: buildDir,
|
buildDir: buildDir,
|
||||||
captureBuild: true,
|
captureBuild: true,
|
||||||
env: env,
|
env: envCopy,
|
||||||
}
|
}
|
||||||
config.deviceConfig = &deviceConfig{
|
config.deviceConfig = &deviceConfig{
|
||||||
config: config,
|
config: config,
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
package cc
|
package cc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"runtime"
|
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
@@ -38,9 +37,6 @@ func TestProto(t *testing.T) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
t.Run("plugin", func(t *testing.T) {
|
t.Run("plugin", func(t *testing.T) {
|
||||||
if runtime.GOOS != "linux" {
|
|
||||||
t.Skip("TODO(b/129763458): cc_binary_host tests fail on mac when trying to exec xcrun")
|
|
||||||
}
|
|
||||||
ctx := testCc(t, `
|
ctx := testCc(t, `
|
||||||
cc_binary_host {
|
cc_binary_host {
|
||||||
name: "protoc-gen-foobar",
|
name: "protoc-gen-foobar",
|
||||||
|
Reference in New Issue
Block a user