forked from joejulian/gio-cmd
+14
-9
@@ -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)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user