Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-06-28 20:56:58 +02:00
parent 333b1df54a
commit 4113870ba2
2 changed files with 19 additions and 9 deletions
+14 -9
View File
@@ -13,6 +13,7 @@ import (
"io/ioutil" "io/ioutil"
"os" "os"
"os/exec" "os/exec"
"runtime"
"strings" "strings"
"testing" "testing"
"time" "time"
@@ -75,23 +76,27 @@ func TestEndToEnd(t *testing.T) {
) )
// Keep this list local, to not reuse TestDriver objects. // Keep this list local, to not reuse TestDriver objects.
subtests := []struct { subtests := []struct {
name string name string
driver TestDriver driver TestDriver
pkgPath string pkgPath string
skipGeese string
}{ }{
{"X11 using go import path", &X11TestDriver{}, testdataWithGoImportPkgPath}, {"X11 using go import path", &X11TestDriver{}, testdataWithGoImportPkgPath, ""},
{"X11", &X11TestDriver{}, testdataWithRelativePkgPath}, {"X11", &X11TestDriver{}, testdataWithRelativePkgPath, ""},
{"X11 with custom rendering", &X11TestDriver{}, customRenderTestdataWithRelativePkgPath}, {"X11 with custom rendering", &X11TestDriver{}, customRenderTestdataWithRelativePkgPath, "openbsd"},
// Doesn't work on the builders. // Doesn't work on the builders.
//{"Wayland", &WaylandTestDriver{}, testdataWithRelativePkgPath}, //{"Wayland", &WaylandTestDriver{}, testdataWithRelativePkgPath},
{"JS", &JSTestDriver{}, testdataWithRelativePkgPath}, {"JS", &JSTestDriver{}, testdataWithRelativePkgPath, ""},
{"Android", &AndroidTestDriver{}, testdataWithRelativePkgPath}, {"Android", &AndroidTestDriver{}, testdataWithRelativePkgPath, ""},
{"Windows", &WineTestDriver{}, testdataWithRelativePkgPath}, {"Windows", &WineTestDriver{}, testdataWithRelativePkgPath, ""},
} }
for _, subtest := range subtests { for _, subtest := range subtests {
t.Run(subtest.name, func(t *testing.T) { t.Run(subtest.name, func(t *testing.T) {
subtest := subtest // copy the changing loop variable subtest := subtest // copy the changing loop variable
if strings.Contains(subtest.skipGeese, runtime.GOOS) {
t.Skipf("not supported on %s", runtime.GOOS)
}
t.Parallel() t.Parallel()
runEndToEndTest(t, subtest.driver, subtest.pkgPath) runEndToEndTest(t, subtest.driver, subtest.pkgPath)
}) })
+5
View File
@@ -30,6 +30,11 @@ import (
/* /*
#cgo linux pkg-config: egl wayland-egl #cgo linux pkg-config: egl wayland-egl
#cgo freebsd openbsd CFLAGS: -I/usr/local/include
#cgo openbsd CFLAGS: -I/usr/X11R6/include
#cgo freebsd LDFLAGS: -L/usr/local/lib
#cgo openbsd LDFLAGS: -L/usr/X11R6/lib
#cgo freebsd openbsd LDFLAGS: -lwayland-egl
#cgo CFLAGS: -DEGL_NO_X11 #cgo CFLAGS: -DEGL_NO_X11
#cgo LDFLAGS: -lEGL -lGLESv2 #cgo LDFLAGS: -lEGL -lGLESv2