|
@@ -38,7 +38,7 @@ func TestSymbolizationPath(t *testing.T) {
|
38
|
38
|
}
|
39
|
39
|
|
40
|
40
|
// Save environment variables to restore after test
|
41
|
|
- saveHome := os.Getenv("HOME")
|
|
41
|
+ saveHome := os.Getenv(homeEnv())
|
42
|
42
|
savePath := os.Getenv("PPROF_BINARY_PATH")
|
43
|
43
|
|
44
|
44
|
tempdir, err := ioutil.TempDir("", "home")
|
|
@@ -50,7 +50,7 @@ func TestSymbolizationPath(t *testing.T) {
|
50
|
50
|
os.Create(filepath.Join(tempdir, "pprof", "binaries", "abcde10001", "binary"))
|
51
|
51
|
|
52
|
52
|
obj := testObj{tempdir}
|
53
|
|
- os.Setenv("HOME", tempdir)
|
|
53
|
+ os.Setenv(homeEnv(), tempdir)
|
54
|
54
|
for _, tc := range []struct {
|
55
|
55
|
env, file, buildID, want string
|
56
|
56
|
msgCount int
|
|
@@ -79,7 +79,7 @@ func TestSymbolizationPath(t *testing.T) {
|
79
|
79
|
t.Errorf("%s:%s:%s, want %s, got %s", tc.env, tc.file, tc.buildID, tc.want, file)
|
80
|
80
|
}
|
81
|
81
|
}
|
82
|
|
- os.Setenv("HOME", saveHome)
|
|
82
|
+ os.Setenv(homeEnv(), saveHome)
|
83
|
83
|
os.Setenv("PPROF_BINARY_PATH", savePath)
|
84
|
84
|
}
|
85
|
85
|
|