mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/shader: stabilize wasm tests on GitHub CI
This commit is contained in:
parent
5d47863a27
commit
d086e83a62
@ -21,6 +21,7 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/hajimehoshi/ebiten/v2/internal/shader"
|
"github.com/hajimehoshi/ebiten/v2/internal/shader"
|
||||||
"github.com/hajimehoshi/ebiten/v2/internal/shaderir"
|
"github.com/hajimehoshi/ebiten/v2/internal/shaderir"
|
||||||
@ -29,6 +30,13 @@ import (
|
|||||||
"github.com/hajimehoshi/ebiten/v2/internal/shaderir/msl"
|
"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 {
|
func glslVertexNormalize(str string) string {
|
||||||
p := glsl.VertexPrelude(glsl.GLSLVersionDefault)
|
p := glsl.VertexPrelude(glsl.GLSLVersionDefault)
|
||||||
if strings.HasPrefix(str, p) {
|
if strings.HasPrefix(str, p) {
|
||||||
|
Loading…
Reference in New Issue
Block a user