mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
.github/workflows: update wasmbrowsertest to fix timeout issue
The issue agnivade/wasmbrowsertest#60 was fixed. Updates #1313
This commit is contained in:
parent
1fc2dedaaa
commit
719838b7ab
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -44,7 +44,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Install wasmbrowsertest
|
- name: Install wasmbrowsertest
|
||||||
run: |
|
run: |
|
||||||
wasmbrowsertest_version=6e494bb3a5ddfe6cccb449250dbdcaa5777b593d
|
wasmbrowsertest_version=6e5bbb88049c42eb62e19d10e5be9940b9271aab
|
||||||
go install github.com/agnivade/wasmbrowsertest@${wasmbrowsertest_version}
|
go install github.com/agnivade/wasmbrowsertest@${wasmbrowsertest_version}
|
||||||
mv $(go env GOPATH)/bin/wasmbrowsertest${{ runner.os == 'Windows' && '.exe' || '' }} $(go env GOPATH)/bin/go_js_wasm_exec${{ runner.os == 'Windows' && '.exe' || '' }}
|
mv $(go env GOPATH)/bin/wasmbrowsertest${{ runner.os == 'Windows' && '.exe' || '' }} $(go env GOPATH)/bin/go_js_wasm_exec${{ runner.os == 'Windows' && '.exe' || '' }}
|
||||||
go install github.com/agnivade/wasmbrowsertest/cmd/cleanenv@${wasmbrowsertest_version}
|
go install github.com/agnivade/wasmbrowsertest/cmd/cleanenv@${wasmbrowsertest_version}
|
||||||
|
@ -17,7 +17,6 @@ package audio_test
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
|
||||||
"runtime"
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
@ -36,14 +35,6 @@ func teardown() {
|
|||||||
context = nil
|
context = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMain(m *testing.M) {
|
|
||||||
code := m.Run()
|
|
||||||
// 200[ms] should be enough all the players are consumed.
|
|
||||||
// TODO: This is a dirty hack. Would it be possible to use virtual time?
|
|
||||||
time.Sleep(200 * time.Millisecond)
|
|
||||||
os.Exit(code)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Issue #746
|
// Issue #746
|
||||||
func TestGC(t *testing.T) {
|
func TestGC(t *testing.T) {
|
||||||
setup()
|
setup()
|
||||||
|
@ -18,22 +18,12 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"io"
|
"io"
|
||||||
"math/rand" // TODO: Use math/rand/v2 when the minimum supported version becomes Go 1.22.
|
"math/rand" // TODO: Use math/rand/v2 when the minimum supported version becomes Go 1.22.
|
||||||
"os"
|
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"github.com/hajimehoshi/ebiten/v2/audio/internal/convert"
|
"github.com/hajimehoshi/ebiten/v2/audio/internal/convert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMain(m *testing.M) {
|
|
||||||
code := m.Run()
|
|
||||||
// Tests in this package often fails on GitHub Actions due to unfinished goroutines.
|
|
||||||
// That's mysterious, but to avoid this, sleep for a while before exiting.
|
|
||||||
time.Sleep(200 * time.Millisecond)
|
|
||||||
os.Exit(code)
|
|
||||||
}
|
|
||||||
|
|
||||||
func randInt16s(n int) []int16 {
|
func randInt16s(n int) []int16 {
|
||||||
r := make([]int16, n)
|
r := make([]int16, n)
|
||||||
for i := range r {
|
for i := range r {
|
||||||
|
@ -21,7 +21,6 @@ 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"
|
||||||
@ -30,13 +29,6 @@ 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