}
func TestListImportMap(t *testing.T) {
+ skipIfGccgo(t, "gccgo does not have standard packages")
tg := testgo(t)
defer tg.cleanup()
tg.parallel()
defer tg.cleanup()
tg.tempFile("triv.go", `package main; func main() {}`)
tg.setenv("GOBIN", ".")
+ tg.cd(tg.path("."))
tg.runFail("install")
tg.grepStderr("cannot install, GOBIN must be an absolute path", "go install must fail if $GOBIN is a relative path")
}
tg.run("list", "-deps", "p1")
tg.grepStdout("p1/p2/p3/p4", "-deps p1 does not mention p4")
- // Check the list is in dependency order.
- tg.run("list", "-deps", "math")
- want := "internal/cpu\nunsafe\nmath\n"
- out := tg.stdout.String()
- if !strings.Contains(out, "internal/cpu") {
- // Some systems don't use internal/cpu.
- want = "unsafe\nmath\n"
- }
- if tg.stdout.String() != want {
- t.Fatalf("list -deps math: wrong order\nhave %q\nwant %q", tg.stdout.String(), want)
+ if runtime.Compiler != "gccgo" {
+ // Check the list is in dependency order.
+ tg.run("list", "-deps", "math")
+ want := "internal/cpu\nunsafe\nmath\n"
+ out := tg.stdout.String()
+ if !strings.Contains(out, "internal/cpu") {
+ // Some systems don't use internal/cpu.
+ want = "unsafe\nmath\n"
+ }
+ if tg.stdout.String() != want {
+ t.Fatalf("list -deps math: wrong order\nhave %q\nwant %q", tg.stdout.String(), want)
+ }
}
}
func TestGoListTest(t *testing.T) {
+ skipIfGccgo(t, "gccgo does not have standard packages")
tg := testgo(t)
defer tg.cleanup()
tg.parallel()
}
func TestGoListExport(t *testing.T) {
+ skipIfGccgo(t, "gccgo does not have standard packages")
tg := testgo(t)
defer tg.cleanup()
tg.parallel()
}
func TestGoTestCpuprofileDashOControlsBinaryLocation(t *testing.T) {
+ skipIfGccgo(t, "gccgo has no standard packages")
tooSlow(t)
tg := testgo(t)
defer tg.cleanup()
}
func TestGoTestDashOWritesBinary(t *testing.T) {
+ skipIfGccgo(t, "gccgo has no standard packages")
tooSlow(t)
tg := testgo(t)
defer tg.cleanup()
}
func TestCoverageRuns(t *testing.T) {
+ skipIfGccgo(t, "gccgo has no cover tool")
tooSlow(t)
tg := testgo(t)
defer tg.cleanup()
}
func TestCoverageDotImport(t *testing.T) {
+ skipIfGccgo(t, "gccgo has no cover tool")
tg := testgo(t)
defer tg.cleanup()
tg.parallel()
// Check that coverage analysis uses set mode.
// Also check that coverage profiles merge correctly.
func TestCoverageUsesSetMode(t *testing.T) {
+ skipIfGccgo(t, "gccgo has no cover tool")
tooSlow(t)
tg := testgo(t)
defer tg.cleanup()
if !canRace {
t.Skip("skipping because race detector not supported")
}
+ skipIfGccgo(t, "gccgo has no cover tool")
tg := testgo(t)
defer tg.cleanup()
}
func TestCoverageSyncAtomicImport(t *testing.T) {
+ skipIfGccgo(t, "gccgo has no cover tool")
tooSlow(t)
tg := testgo(t)
defer tg.cleanup()
}
func TestCoverageImportMainLoop(t *testing.T) {
+ skipIfGccgo(t, "gccgo has no cover tool")
tg := testgo(t)
defer tg.cleanup()
tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
}
func TestCoveragePattern(t *testing.T) {
+ skipIfGccgo(t, "gccgo has no cover tool")
tooSlow(t)
tg := testgo(t)
defer tg.cleanup()
}
func TestCoverageErrorLine(t *testing.T) {
+ skipIfGccgo(t, "gccgo has no cover tool")
tooSlow(t)
tg := testgo(t)
defer tg.cleanup()
}
func TestCoverageFunc(t *testing.T) {
+ skipIfGccgo(t, "gccgo has no cover tool")
tooSlow(t)
tg := testgo(t)
defer tg.cleanup()
// Issue 24588.
func TestCoverageDashC(t *testing.T) {
+ skipIfGccgo(t, "gccgo has no cover tool")
tg := testgo(t)
defer tg.cleanup()
tg.parallel()
}
func TestCoverageWithCgo(t *testing.T) {
+ skipIfGccgo(t, "gccgo has no cover tool")
tooSlow(t)
if !canCgo {
t.Skip("skipping because cgo not enabled")
}
func TestCacheVet(t *testing.T) {
+ skipIfGccgo(t, "gccgo has no standard packages")
tg := testgo(t)
defer tg.cleanup()
tg.parallel()
// Issue 24704.
func TestLinkerTmpDirIsDeleted(t *testing.T) {
+ skipIfGccgo(t, "gccgo does not use cmd/link")
if !canCgo {
t.Skip("skipping because cgo not enabled")
}
}
func testCDAndGOPATHAreDifferent(tg *testgoData, cd, gopath string) {
+ skipIfGccgo(tg.t, "gccgo does not support -ldflags -X")
tg.setenv("GOPATH", gopath)
tg.tempDir("dir")
// Issue 25093.
func TestCoverpkgTestOnly(t *testing.T) {
+ skipIfGccgo(t, "gccgo has no cover tool")
tg := testgo(t)
defer tg.cleanup()
tg.parallel()