From 4cf62999867045b2cd6e5c3602a9881576b74989 Mon Sep 17 00:00:00 2001 From: Ron Evans Date: Wed, 30 May 2018 19:53:10 +0200 Subject: [PATCH] build: further refactor ci test script for covercov groups for go 1.9.x compat Signed-off-by: Ron Evans --- .travis.yml | 2 ++ ci/test.sh | 14 +++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b4227462..46414cfb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,6 +57,8 @@ script: - make fmt_check after_success: - 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 "./drivers.cov" -F drivers branches: diff --git a/ci/test.sh b/ci/test.sh index d075e756..8ac5b1fa 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -25,12 +25,24 @@ else fi # 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 FAIL_PACKAGES+="core"; fi; 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 result=$(go test -covermode=count -coverprofile=platforms.cov ./platforms/...) if [ $? -ne 0 ]; then