From deba72161ca1573a9236b966be0492c81c509b09 Mon Sep 17 00:00:00 2001 From: "Lukacs T. Berki" Date: Thu, 4 Mar 2021 10:50:10 +0100 Subject: [PATCH] Make tests work again on Darwin. aosp/1609473 broke this by making originalEnv empty unless InitEnvironment() is called, which doesn't happen in tests. Bug: 181835672 Test: "m nothing" on Linux and Darwin. Change-Id: I33f9cce65a9151e620e1dddafb62d4c599ed2cac --- android/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/config.go b/android/config.go index ef5eadfb9..c10ad09ae 100644 --- a/android/config.go +++ b/android/config.go @@ -232,7 +232,7 @@ func TestConfig(buildDir string, env map[string]string, bp string, fs map[string // Copy the real PATH value to the test environment, it's needed by // NonHermeticHostSystemTool() used in x86_darwin_host.go - envCopy["PATH"] = originalEnv["PATH"] + envCopy["PATH"] = os.Getenv("PATH") config := &config{ productVariables: productVariables{