# before trying "go test". Otherwise, coverage-reporting
# mode makes Go show the wrong line numbers when reporting
# compilation errors.
# before trying "go test". Otherwise, coverage-reporting
# mode makes Go show the wrong line numbers when reporting
# compilation errors.
if [[ -n "${testargs[$1]}" ]]
then
# "go test -check.vv giturl" doesn't work, but this
# does:
if [[ -n "${testargs[$1]}" ]]
then
# "go test -check.vv giturl" doesn't work, but this
# does:
else
# The above form gets verbose even when testargs is
# empty, so use this form in such cases:
else
# The above form gets verbose even when testargs is
# empty, so use this form in such cases:
- go tool cover -html="$WORKSPACE/tmp/.$covername.tmp" -o "$WORKSPACE/tmp/$covername.html"
- rm "$WORKSPACE/tmp/.$covername.tmp"
+ if [[ -f "$WORKSPACE/tmp/.$covername.tmp" ]]
+ then
+ go tool cover -html="$WORKSPACE/tmp/.$covername.tmp" -o "$WORKSPACE/tmp/$covername.html"
+ rm "$WORKSPACE/tmp/.$covername.tmp"
+ fi
}
do_test apps/workbench workbench
test_workbench_benchmark() {
start_nginx_proxy_services \
&& cd "$WORKSPACE/apps/workbench" \
}
do_test apps/workbench workbench
test_workbench_benchmark() {
start_nginx_proxy_services \
&& cd "$WORKSPACE/apps/workbench" \
}
do_test apps/workbench_benchmark workbench_benchmark
test_workbench_profile() {
start_nginx_proxy_services \
&& cd "$WORKSPACE/apps/workbench" \
}
do_test apps/workbench_benchmark workbench_benchmark
test_workbench_profile() {
start_nginx_proxy_services \
&& cd "$WORKSPACE/apps/workbench" \