forked from joejulian/gio
.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:
+2
-2
@@ -28,11 +28,11 @@ tasks:
|
|||||||
sudo apt install -y google-chrome-stable
|
sudo apt install -y google-chrome-stable
|
||||||
- test_gio: |
|
- test_gio: |
|
||||||
cd gio
|
cd gio
|
||||||
go test ./...
|
go test -race ./...
|
||||||
GOOS=windows go test -exec=wine ./...
|
GOOS=windows go test -exec=wine ./...
|
||||||
- test_example: |
|
- test_example: |
|
||||||
cd gio/example
|
cd gio/example
|
||||||
go test ./...
|
go test -race ./...
|
||||||
- test_cmd: |
|
- test_cmd: |
|
||||||
cd gio/cmd
|
cd gio/cmd
|
||||||
go test ./...
|
go test ./...
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ func (d *WaylandTestDriver) Start(t_ *testing.T, path string, width, height int)
|
|||||||
cleanups = append(cleanups, func() { os.RemoveAll(dir) })
|
cleanups = append(cleanups, func() { os.RemoveAll(dir) })
|
||||||
|
|
||||||
bin := filepath.Join(dir, "red")
|
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 {
|
if out, err := cmd.CombinedOutput(); err != nil {
|
||||||
d.t.Fatalf("could not build app: %s:\n%s", err, out)
|
d.t.Fatalf("could not build app: %s:\n%s", err, out)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ func (d *X11TestDriver) Start(t_ *testing.T, path string, width, height int) (cl
|
|||||||
cleanups = append(cleanups, func() { os.RemoveAll(dir) })
|
cleanups = append(cleanups, func() { os.RemoveAll(dir) })
|
||||||
|
|
||||||
bin := filepath.Join(dir, "red")
|
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 {
|
if out, err := cmd.CombinedOutput(); err != nil {
|
||||||
d.t.Fatalf("could not build app: %s:\n%s", err, out)
|
d.t.Fatalf("could not build app: %s:\n%s", err, out)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user