File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,13 @@ GOOS=js GOARCH=wasm go vet ./...
99go install golang.org/x/lint/golint
1010GOOS=js GOARCH=wasm golint -set_exit_status ./...
1111
12- wsjstestOut=" $( mktemp -d) /stdout"
13- mkfifo " $wsjstestOut "
12+ wsjstestOut=" $( mktemp) "
1413go install ./internal/wsjstest
15- timeout 30s wsjstest > " $wsjstestOut " &
14+ timeout 30s wsjstest >> " $wsjstestOut " &
1615wsjstestPID=$!
1716
18- WS_ECHO_SERVER_URL=" $( timeout 10s head -n 1 " $wsjstestOut " ) " || true
17+ # See https://superuser.com/a/900134
18+ WS_ECHO_SERVER_URL=" $( (tail -f -n0 " $wsjstestOut " & ) | timeout 10s head -n 1) "
1919if [[ -z $WS_ECHO_SERVER_URL ]]; then
2020 echo " ./internal/wsjstest failed to start in 10s"
2121 exit 1
@@ -25,7 +25,7 @@ go install github.com/agnivade/wasmbrowsertest
2525GOOS=js GOARCH=wasm go test -exec=wasmbrowsertest ./... -args " $WS_ECHO_SERVER_URL "
2626
2727if ! wait " $wsjstestPID " ; then
28- echo " wsjstest exited unsuccessfully"
28+ echo " --- wsjstest exited unsuccessfully"
2929 echo " output:"
3030 cat " $wsjstestOut "
3131 exit 1
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ func main() {
3636
3737 os .Exit (0 )
3838 }))
39+
3940 wsURL := strings .Replace (s .URL , "http" , "ws" , 1 )
4041 fmt .Printf ("%v\n " , wsURL )
4142
You can’t perform that action at this time.
0 commit comments