File tree 2 files changed +6
-5
lines changed 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 ./...
9
9
go install golang.org/x/lint/golint
10
10
GOOS=js GOARCH=wasm golint -set_exit_status ./...
11
11
12
- wsjstestOut=" $( mktemp -d) /stdout"
13
- mkfifo " $wsjstestOut "
12
+ wsjstestOut=" $( mktemp) "
14
13
go install ./internal/wsjstest
15
- timeout 30s wsjstest > " $wsjstestOut " &
14
+ timeout 30s wsjstest >> " $wsjstestOut " &
16
15
wsjstestPID=$!
17
16
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) "
19
19
if [[ -z $WS_ECHO_SERVER_URL ]]; then
20
20
echo " ./internal/wsjstest failed to start in 10s"
21
21
exit 1
@@ -25,7 +25,7 @@ go install github.com/agnivade/wasmbrowsertest
25
25
GOOS=js GOARCH=wasm go test -exec=wasmbrowsertest ./... -args " $WS_ECHO_SERVER_URL "
26
26
27
27
if ! wait " $wsjstestPID " ; then
28
- echo " wsjstest exited unsuccessfully"
28
+ echo " --- wsjstest exited unsuccessfully"
29
29
echo " output:"
30
30
cat " $wsjstestOut "
31
31
exit 1
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ func main() {
36
36
37
37
os .Exit (0 )
38
38
}))
39
+
39
40
wsURL := strings .Replace (s .URL , "http" , "ws" , 1 )
40
41
fmt .Printf ("%v\n " , wsURL )
41
42
You can’t perform that action at this time.
0 commit comments