internal/shader: stabilize wasm tests on GitHub CI

This commit is contained in:
Hajime Hoshi 2024-07-26 03:16:27 +09:00
parent 5d47863a27
commit d086e83a62

View File

@ -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) {