MCPcopy Create free account
hub / github.com/google/pprof / maybeSkipBrowserTest

Function maybeSkipBrowserTest

browsertests/browser_test.go:32–48  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

30)
31
32func maybeSkipBrowserTest(t *testing.T) {
33 // Limit to just Linux for now since this is expensive and the
34 // browser interactions should be platform agnostic. If we ever
35 // see a benefit from wider testing, we can relax this.
36 if runtime.GOOS != "linux" || runtime.GOARCH != "amd64" {
37 t.Skip("This test only works on x86-64 Linux")
38 }
39
40 // Check that browser is available.
41 if _, err := exec.LookPath("google-chrome"); err == nil {
42 return
43 }
44 if _, err := exec.LookPath("chrome"); err == nil {
45 return
46 }
47 t.Skip("chrome not available")
48}
49
50func TestTopTable(t *testing.T) {
51 maybeSkipBrowserTest(t)

Callers 3

TestTopTableFunction · 0.85
TestFlameGraphFunction · 0.85
TestSourceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…