Skip to content

Commit

Permalink
misc/cgo/testcshared: don't overwrite cc in parallel runs
Browse files Browse the repository at this point in the history
Fixes golang#22176

Change-Id: If47ec9a25da6b480868d8eeccc518dc97d48bda7
Reviewed-on: https://go-review.googlesource.com/69230
Reviewed-by: Alex Brainman <[email protected]>
  • Loading branch information
ianlancetaylor committed Oct 9, 2017
1 parent e8a27da commit 24f9db7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion misc/cgo/testcshared/cshared_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ func runExe(t *testing.T, env []string, args ...string) string {

func runCC(t *testing.T, args ...string) string {
t.Helper()
return run(t, nil, append(cc, args...)...)
// This function is run in parallel, so append to a copy of cc
// rather than cc itself.
return run(t, nil, append(append([]string(nil), cc...), args...)...)
}

func createHeaders() error {
Expand Down

0 comments on commit 24f9db7

Please sign in to comment.