Skip to content

Commit 041d885

Browse files
committed
[dev.link] cmd/link: run more tests in parallel
Change-Id: I4062fd89f234b4ca5386b74584e1363c05e82e84 Reviewed-on: https://go-review.googlesource.com/c/go/+/241177 Run-TryBot: Cherry Zhang <[email protected]> Reviewed-by: Jeremy Faller <[email protected]> Reviewed-by: Than McIntosh <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 130ede0 commit 041d885

File tree

5 files changed

+31
-0
lines changed

5 files changed

+31
-0
lines changed

src/cmd/link/dwarf_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ func testDWARF(t *testing.T, buildmode string, expectDWARF bool, env ...string)
2828
t.Skip("skipping on plan9; no DWARF symbol table in executables")
2929
}
3030

31+
t.Parallel()
32+
3133
out, err := exec.Command(testenv.GoToolPath(t), "list", "-f", "{{.Stale}}", "cmd/link").CombinedOutput()
3234
if err != nil {
3335
t.Fatalf("go list: %v\n%s", err, out)

src/cmd/link/elf_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,8 @@ func TestPIESize(t *testing.T) {
230230
t.Skip("-buildmode=pie not supported")
231231
}
232232

233+
t.Parallel()
234+
233235
tmpl := template.Must(template.New("pie").Parse(pieSourceTemplate))
234236

235237
writeGo := func(t *testing.T, dir string) {

src/cmd/link/internal/ld/dwarf_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,6 +1376,8 @@ func TestIssue38192(t *testing.T) {
13761376
t.Skip("skipping on plan9; no DWARF symbol table in executables")
13771377
}
13781378

1379+
t.Parallel()
1380+
13791381
// Build a test program that contains a translation unit whose
13801382
// text (from am assembly source) contains only a single instruction.
13811383
tmpdir, err := ioutil.TempDir("", "TestIssue38192")
@@ -1487,6 +1489,8 @@ func TestIssue39757(t *testing.T) {
14871489
t.Skip("skipping on plan9; no DWARF symbol table in executables")
14881490
}
14891491

1492+
t.Parallel()
1493+
14901494
// In this bug the DWARF line table contents for the last couple of
14911495
// instructions in a function were incorrect (bad file/line). This
14921496
// test verifies that all of the line table rows for a function

src/cmd/link/internal/ld/issue33808_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ func TestIssue33808(t *testing.T) {
2929
}
3030
testenv.MustHaveGoBuild(t)
3131
testenv.MustHaveCGO(t)
32+
t.Parallel()
3233

3334
dir, err := ioutil.TempDir("", "TestIssue33808")
3435
if err != nil {

src/cmd/link/link_test.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ func TestIssue28429(t *testing.T) {
119119
func TestUnresolved(t *testing.T) {
120120
testenv.MustHaveGoBuild(t)
121121

122+
t.Parallel()
123+
122124
tmpdir, err := ioutil.TempDir("", "unresolved-")
123125
if err != nil {
124126
t.Fatalf("failed to create temp dir: %v", err)
@@ -185,6 +187,8 @@ func TestIssue33979(t *testing.T) {
185187
t.Skipf("Skipping on %s/%s", runtime.GOOS, runtime.GOARCH)
186188
}
187189

190+
t.Parallel()
191+
188192
tmpdir, err := ioutil.TempDir("", "unresolved-")
189193
if err != nil {
190194
t.Fatalf("failed to create temp dir: %v", err)
@@ -274,6 +278,8 @@ func TestBuildForTvOS(t *testing.T) {
274278
t.Skipf("error running xcrun, required for iOS cross build: %v", err)
275279
}
276280

281+
t.Parallel()
282+
277283
sdkPath, err := exec.Command("xcrun", "--sdk", "appletvos", "--show-sdk-path").Output()
278284
if err != nil {
279285
t.Skip("failed to locate appletvos SDK, skipping")
@@ -324,6 +330,8 @@ func main() { println(X) }
324330
func TestXFlag(t *testing.T) {
325331
testenv.MustHaveGoBuild(t)
326332

333+
t.Parallel()
334+
327335
tmpdir, err := ioutil.TempDir("", "TestXFlag")
328336
if err != nil {
329337
t.Fatal(err)
@@ -350,6 +358,8 @@ func main() { }
350358
func TestMacOSVersion(t *testing.T) {
351359
testenv.MustHaveGoBuild(t)
352360

361+
t.Parallel()
362+
353363
tmpdir, err := ioutil.TempDir("", "TestMacOSVersion")
354364
if err != nil {
355365
t.Fatal(err)
@@ -427,6 +437,8 @@ func TestIssue34788Android386TLSSequence(t *testing.T) {
427437
t.Skip("skipping on non-{linux,darwin}/amd64 platform")
428438
}
429439

440+
t.Parallel()
441+
430442
tmpdir, err := ioutil.TempDir("", "TestIssue34788Android386TLSSequence")
431443
if err != nil {
432444
t.Fatal(err)
@@ -487,6 +499,8 @@ func TestStrictDup(t *testing.T) {
487499
// Check that -strictdups flag works.
488500
testenv.MustHaveGoBuild(t)
489501

502+
t.Parallel()
503+
490504
tmpdir, err := ioutil.TempDir("", "TestStrictDup")
491505
if err != nil {
492506
t.Fatal(err)
@@ -571,6 +585,8 @@ func TestFuncAlign(t *testing.T) {
571585
}
572586
testenv.MustHaveGoBuild(t)
573587

588+
t.Parallel()
589+
574590
tmpdir, err := ioutil.TempDir("", "TestFuncAlign")
575591
if err != nil {
576592
t.Fatal(err)
@@ -637,6 +653,8 @@ func TestTrampoline(t *testing.T) {
637653

638654
testenv.MustHaveGoBuild(t)
639655

656+
t.Parallel()
657+
640658
tmpdir, err := ioutil.TempDir("", "TestTrampoline")
641659
if err != nil {
642660
t.Fatal(err)
@@ -671,6 +689,8 @@ func TestIndexMismatch(t *testing.T) {
671689
// manually, and try to "trick" the linker with an inconsistent object file.
672690
testenv.MustHaveGoBuild(t)
673691

692+
t.Parallel()
693+
674694
tmpdir, err := ioutil.TempDir("", "TestIndexMismatch")
675695
if err != nil {
676696
t.Fatal(err)
@@ -731,6 +751,8 @@ func TestPErsrc(t *testing.T) {
731751
t.Skipf("this is a windows/amd64-only test")
732752
}
733753

754+
t.Parallel()
755+
734756
tmpdir, err := ioutil.TempDir("", "TestPErsrc")
735757
if err != nil {
736758
t.Fatal(err)

0 commit comments

Comments
 (0)