From d086e83a62804145fb9da4854ed0162766f412e5 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 26 Jul 2024 03:16:27 +0900 Subject: [PATCH] internal/shader: stabilize wasm tests on GitHub CI --- internal/shader/shader_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/shader/shader_test.go b/internal/shader/shader_test.go index 954ba099d..fd182b0a1 100644 --- a/internal/shader/shader_test.go +++ b/internal/shader/shader_test.go @@ -21,6 +21,7 @@ import ( "runtime" "strings" "testing" + "time" "github.com/hajimehoshi/ebiten/v2/internal/shader" "github.com/hajimehoshi/ebiten/v2/internal/shaderir" @@ -29,6 +30,13 @@ import ( "github.com/hajimehoshi/ebiten/v2/internal/shaderir/msl" ) +func TestMain(m *testing.M) { + code := m.Run() + // The Wasm tests on GitHub CI often fail due to some remaining functions. Wait for a while to finish them. + time.Sleep(100 * time.Millisecond) + os.Exit(code) +} + func glslVertexNormalize(str string) string { p := glsl.VertexPrelude(glsl.GLSLVersionDefault) if strings.HasPrefix(str, p) {