| 1 |
// Copyright 2012 The Go Authors. All rights reserved. |
| 2 |
// Use of this source code is governed by a BSD-style |
| 3 |
// license that can be found in the LICENSE file. |
| 4 |
|
| 5 |
package race_test |
| 6 |
|
| 7 |
import ( |
| 8 |
"internal/testenv" |
| 9 |
"os" |
| 10 |
"os/exec" |
| 11 |
"testing" |
| 12 |
) |
| 13 |
|
| 14 |
func TestNoRaceCgoSync(t *testing.T) { |
| 15 |
cmd := exec.Command(testenv.GoToolPath(t), "run", "-race", "cgo_test_main.go") |
| 16 |
cmd.Stdout = os.Stdout |
| 17 |
cmd.Stderr = os.Stderr |
| 18 |
if err := cmd.Run(); err != nil { |
| 19 |
t.Fatalf("program exited with error: %v\n", err) |
| 20 |
} |
| 21 |
} |