mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
.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
|
||||
- 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 ./...
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user