-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathtest.sh
30 lines (26 loc) · 893 Bytes
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
go test -race -v ./...
ret=$?; if [[ $ret -ne 0 && $ret -ne 1 ]]; then
echo "Test failed, exit $ret"
exit $ret
fi
echo "mode: atomic" > coverage.txt
function coverage() {
go test $1 -race -coverprofile=tmp.txt -covermode=atomic
ret=$?; if [[ $ret -eq 0 ]]; then
cat tmp.txt >> coverage.txt
rm -f tmp.txt
fi
}
coverage github.com/ossrs/go-oryx-lib/aac
coverage github.com/ossrs/go-oryx-lib/amf0
coverage github.com/ossrs/go-oryx-lib/asprocess
coverage github.com/ossrs/go-oryx-lib/avc
coverage github.com/ossrs/go-oryx-lib/flv
coverage github.com/ossrs/go-oryx-lib/http
coverage github.com/ossrs/go-oryx-lib/https
coverage github.com/ossrs/go-oryx-lib/json
coverage github.com/ossrs/go-oryx-lib/kxps
coverage github.com/ossrs/go-oryx-lib/logger
coverage github.com/ossrs/go-oryx-lib/options
coverage github.com/ossrs/go-oryx-lib/rtmp