.build,cmd: add -race to test programs

It's not possible to set GOFLAGS=-race because some programs are
built for webassembly where -race is not supported.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-11-03 12:09:02 +01:00
parent b3635c78ee
commit cc4b407647
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ func (d *WaylandTestDriver) Start(t_ *testing.T, path string, width, height int)
cleanups = append(cleanups, func() { os.RemoveAll(dir) })
bin := filepath.Join(dir, "red")
cmd := exec.Command("go", "build", "-tags", "nox11", "-o="+bin, path)
cmd := exec.Command("go", "build", "-race", "-tags", "nox11", "-o="+bin, path)
if out, err := cmd.CombinedOutput(); err != nil {
d.t.Fatalf("could not build app: %s:\n%s", err, out)
}
+1 -1
View File
@@ -69,7 +69,7 @@ func (d *X11TestDriver) Start(t_ *testing.T, path string, width, height int) (cl
cleanups = append(cleanups, func() { os.RemoveAll(dir) })
bin := filepath.Join(dir, "red")
cmd := exec.Command("go", "build", "-tags", "nowayland", "-o="+bin, path)
cmd := exec.Command("go", "build", "-race", "-tags", "nowayland", "-o="+bin, path)
if out, err := cmd.CombinedOutput(); err != nil {
d.t.Fatalf("could not build app: %s:\n%s", err, out)
}