mirror of
https://github.com/pldubouilh/gossa.git
synced 2026-08-29 05:16:33 -04:00
add coverage test
This commit is contained in:
committed by
Pierre Dubouilh
parent
5b55ab0a0a
commit
65a6087c60
@@ -17,25 +17,28 @@ run-ro:
|
||||
run-extra:
|
||||
./gossa -verb=true -prefix="/fancy-path/" -k=false -symlinks=true test-fixture
|
||||
|
||||
test:
|
||||
make build
|
||||
test:
|
||||
-@cd test-fixture && ln -s ../support .; true
|
||||
go test -cover -c -tags testrunmain
|
||||
|
||||
-@killall gossa; true
|
||||
-make run &
|
||||
timeout -s SIGINT 3 ./gossa.test -test.coverprofile=normal.out -test.run '^TestRunMain' -verb=true test-fixture &
|
||||
sleep 2
|
||||
go test -run TestNormal
|
||||
|
||||
killall gossa
|
||||
sleep 1
|
||||
-make run-extra &
|
||||
|
||||
timeout -s SIGINT 3 ./gossa.test -test.coverprofile=extra.out -test.run '^TestRunMain' -prefix='/fancy-path/' -k=false -symlinks=true test-fixture &
|
||||
sleep 2
|
||||
go test -run TestExtra
|
||||
|
||||
killall gossa
|
||||
sleep 1
|
||||
-make run-ro &
|
||||
go test -run TestRo
|
||||
|
||||
killall gossa
|
||||
timeout -s SIGINT 3 ./gossa.test -test.coverprofile=ro.out -test.run '^TestRunMain' -ro=true test-fixture &
|
||||
sleep 2
|
||||
go test -run TestRo
|
||||
sleep 1
|
||||
|
||||
# gocovmerge ro.out extra.out normal.out > all.out
|
||||
# go tool cover -html all.out
|
||||
# go tool cover -func=all.out | grep main | grep '9.\..\%'
|
||||
|
||||
watch:
|
||||
ls gossa.go gossa_test.go gossa-ui/* | entr -rc make build run
|
||||
|
||||
Reference in New Issue
Block a user