.github/workflows: update wasmbrowsertest to fix timeout issue

The issue agnivade/wasmbrowsertest#60 was fixed.

Updates #1313
This commit is contained in:
Hajime Hoshi 2024-08-02 15:27:53 +09:00
parent 1fc2dedaaa
commit 719838b7ab
4 changed files with 1 additions and 28 deletions

View File

@ -44,7 +44,7 @@ jobs:
- name: Install wasmbrowsertest
run: |
wasmbrowsertest_version=6e494bb3a5ddfe6cccb449250dbdcaa5777b593d
wasmbrowsertest_version=6e5bbb88049c42eb62e19d10e5be9940b9271aab
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' || '' }}
go install github.com/agnivade/wasmbrowsertest/cmd/cleanenv@${wasmbrowsertest_version}

View File

@ -17,7 +17,6 @@ package audio_test
import (
"bytes"
"io"
"os"
"runtime"
"testing"
"time"
@ -36,14 +35,6 @@ func teardown() {
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
func TestGC(t *testing.T) {
setup()

View File

@ -18,22 +18,12 @@ import (
"bytes"
"io"
"math/rand" // TODO: Use math/rand/v2 when the minimum supported version becomes Go 1.22.
"os"
"testing"
"time"
"unsafe"
"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 {
r := make([]int16, n)
for i := range r {

View File

@ -21,7 +21,6 @@ import (
"runtime"
"strings"
"testing"
"time"
"github.com/hajimehoshi/ebiten/v2/internal/shader"
"github.com/hajimehoshi/ebiten/v2/internal/shaderir"
@ -30,13 +29,6 @@ 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) {