.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
+2 -2
View File
@@ -28,11 +28,11 @@ tasks:
sudo apt install -y google-chrome-stable
- test_gio: |
cd gio
go test ./...
go test -race ./...
GOOS=windows go test -exec=wine ./...
- test_example: |
cd gio/example
go test ./...
go test -race ./...
- test_cmd: |
cd gio/cmd
go test ./...
+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)
}