mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
cover: move coverage test script to "tests"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
0c327ea456
commit
0e7f1100e3
2
test
2
test
@ -46,7 +46,7 @@ fi
|
||||
|
||||
USERPKG=${PKG:-}
|
||||
|
||||
# Invoke ./cover for HTML output
|
||||
# Invoke ./tests/cover.test.bash for HTML output
|
||||
COVER=${COVER:-"-cover"}
|
||||
|
||||
# Hack: gofmt ./ will recursively check the .git directory. So use *.go for gofmt.
|
||||
|
@ -1,10 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Generate coverage HTML for a package
|
||||
# e.g. PKG=./unit ./cover
|
||||
# e.g. PKG=./unit ./tests/cover.test.bash
|
||||
#
|
||||
set -e
|
||||
|
||||
if ! [[ "$0" =~ "tests/cover.test.bash" ]]; then
|
||||
echo "must be run from repository root"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
if [ -z "$PKG" ]; then
|
||||
echo "cover only works with a single package, sorry"
|
||||
exit 255
|
Loading…
x
Reference in New Issue
Block a user