Skip to content

Commit fa753a2

Browse files
committed
Bring back coverage-check target
Signed-off-by: Alexey Fomenko <alexey.fomenko@intel.com>
1 parent cb61abe commit fa753a2

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

.github/scripts/coverage_check.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ set -euo pipefail
33

44
RESULT=$(make "$1" | awk '/total:/ {print ($3+0)}')
55

6-
if (( $(echo "$RESULT > $2" | bc -l) )); then
7-
echo "$1 $RESULT% is above threshold $2%"
6+
if (( $(echo "$RESULT >= $2" | bc -l) )); then
7+
echo "$1 $RESULT% is above or equal to the threshold $2%"
88
exit 0
99
else
1010
echo "$1 $RESULT% is below threshold $2%. Add more tests!"

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,13 @@ gaudi-coverage: clean-coverage vendor copytests gaudi-coverage.out
336336
%-coverage: %-coverage.out
337337
go tool cover -func=$@.out
338338

339+
.PHONY: coverage-check
340+
coverage-check: coverage.out
341+
.github/scripts/coverage_check.sh gpu-coverage 70
342+
.github/scripts/coverage_check.sh gaudi-coverage 70
343+
.github/scripts/coverage_check.sh qat-coverage 70
344+
345+
339346
.PHONY: copytests
340347
copytests:
341348
@echo "Copying test files to cmd/kubelet-gaudi-plugin/vendor to make them available for gaudi coverage testing which executes tests in that directory and its subdirectories only."

0 commit comments

Comments
 (0)