From 4113870ba221998398bc838a5316b9ef099d6004 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Tue, 28 Jun 2022 20:56:58 +0200 Subject: [PATCH] fixup Signed-off-by: Elias Naur --- gogio/e2e_test.go | 23 ++++++++++++++--------- gogio/internal/custom/testdata.go | 5 +++++ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/gogio/e2e_test.go b/gogio/e2e_test.go index f975e33..b93a734 100644 --- a/gogio/e2e_test.go +++ b/gogio/e2e_test.go @@ -13,6 +13,7 @@ import ( "io/ioutil" "os" "os/exec" + "runtime" "strings" "testing" "time" @@ -75,23 +76,27 @@ func TestEndToEnd(t *testing.T) { ) // Keep this list local, to not reuse TestDriver objects. subtests := []struct { - name string - driver TestDriver - pkgPath string + name string + driver TestDriver + pkgPath string + skipGeese string }{ - {"X11 using go import path", &X11TestDriver{}, testdataWithGoImportPkgPath}, - {"X11", &X11TestDriver{}, testdataWithRelativePkgPath}, - {"X11 with custom rendering", &X11TestDriver{}, customRenderTestdataWithRelativePkgPath}, + {"X11 using go import path", &X11TestDriver{}, testdataWithGoImportPkgPath, ""}, + {"X11", &X11TestDriver{}, testdataWithRelativePkgPath, ""}, + {"X11 with custom rendering", &X11TestDriver{}, customRenderTestdataWithRelativePkgPath, "openbsd"}, // Doesn't work on the builders. //{"Wayland", &WaylandTestDriver{}, testdataWithRelativePkgPath}, - {"JS", &JSTestDriver{}, testdataWithRelativePkgPath}, - {"Android", &AndroidTestDriver{}, testdataWithRelativePkgPath}, - {"Windows", &WineTestDriver{}, testdataWithRelativePkgPath}, + {"JS", &JSTestDriver{}, testdataWithRelativePkgPath, ""}, + {"Android", &AndroidTestDriver{}, testdataWithRelativePkgPath, ""}, + {"Windows", &WineTestDriver{}, testdataWithRelativePkgPath, ""}, } for _, subtest := range subtests { t.Run(subtest.name, func(t *testing.T) { subtest := subtest // copy the changing loop variable + if strings.Contains(subtest.skipGeese, runtime.GOOS) { + t.Skipf("not supported on %s", runtime.GOOS) + } t.Parallel() runEndToEndTest(t, subtest.driver, subtest.pkgPath) }) diff --git a/gogio/internal/custom/testdata.go b/gogio/internal/custom/testdata.go index 4f8b77c..52c6207 100644 --- a/gogio/internal/custom/testdata.go +++ b/gogio/internal/custom/testdata.go @@ -30,6 +30,11 @@ import ( /* #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 LDFLAGS: -lEGL -lGLESv2