Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal/driver: skip TestHttpsInsecure test on iOS #256

Merged
merged 1 commit into from
Nov 8, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 13 additions & 2 deletions internal/driver/fetch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,14 @@ func TestHttpsInsecure(t *testing.T) {
Timeout: 10,
Symbolize: "remote",
}
rx := "Saved profile in"
if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
// On iOS, $HOME points to the app root directory and is not writable.
rx += "|Could not use temp dir"
}
o := &plugin.Options{
Obj: &binutils.Binutils{},
UI: &proftest.TestUI{T: t, AllowRx: "Saved profile in"},
UI: &proftest.TestUI{T: t, AllowRx: rx},
}
o.Sym = &symbolizer.Symbolizer{Obj: o.Obj, UI: o.UI}
p, err := fetchProfiles(s, o)
Expand All @@ -423,9 +428,15 @@ func TestHttpsInsecure(t *testing.T) {
if len(p.SampleType) == 0 {
t.Fatalf("fetchProfiles(%s) got empty profile: len(p.SampleType)==0", address)
}
if runtime.GOOS == "plan9" {
switch runtime.GOOS {
case "plan9":
// CPU profiling is not supported on Plan9; see golang.org/issues/22564.
return
case "darwin":
if runtime.GOARCH == "arm" || runtime.GOARCH == "arm64" {
// CPU profiling on iOS os not symbolized; see golang.org/issues/22612.
return
}
}
if len(p.Function) == 0 {
t.Fatalf("fetchProfiles(%s) got non-symbolized profile: len(p.Function)==0", address)
Expand Down