build: further refactor ci test script for covercov groups for go 1.9.x compat

Signed-off-by: Ron Evans <ron@hybridgroup.com>
This commit is contained in:
Ron Evans 2018-05-30 19:53:10 +02:00
parent 9e5a4cb359
commit 4cf6299986
2 changed files with 15 additions and 1 deletions

View File

@ -57,6 +57,8 @@ script:
- make fmt_check - make fmt_check
after_success: after_success:
- bash <(curl -s https://codecov.io/bash) -f "./core.cov" -F core - bash <(curl -s https://codecov.io/bash) -f "./core.cov" -F core
- bash <(curl -s https://codecov.io/bash) -f "./api.cov" -F core
- bash <(curl -s https://codecov.io/bash) -f "./sysfs.cov" -F core
- bash <(curl -s https://codecov.io/bash) -f "./platforms.cov" -F platforms - bash <(curl -s https://codecov.io/bash) -f "./platforms.cov" -F platforms
- bash <(curl -s https://codecov.io/bash) -f "./drivers.cov" -F drivers - bash <(curl -s https://codecov.io/bash) -f "./drivers.cov" -F drivers
branches: branches:

View File

@ -25,12 +25,24 @@ else
fi fi
# Set up core coverage report file # Set up core coverage report file
result=$(go test -covermode=count -coverprofile=core.cov . ./api/ ./sysfs/) result=$(go test -covermode=count -coverprofile=core.cov .)
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
FAIL_PACKAGES+="core"; FAIL_PACKAGES+="core";
fi; fi;
echo "$result" echo "$result"
result=$(go test -covermode=count -coverprofile=api.cov ./api/...)
if [ $? -ne 0 ]; then
FAIL_PACKAGES+="api";
fi;
echo "$result"
result=$(go test -covermode=count -coverprofile=sysfs.cov ./sysfs/...)
if [ $? -ne 0 ]; then
FAIL_PACKAGES+="sysfs";
fi;
echo "$result"
# Set up platforms coverage report file # Set up platforms coverage report file
result=$(go test -covermode=count -coverprofile=platforms.cov ./platforms/...) result=$(go test -covermode=count -coverprofile=platforms.cov ./platforms/...)
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then