You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/scripts/coverage.awk

14 lines
313 B

#!/usr/bin/env awk
{
print $0
if (match($0, /^total:/)) {
sub(/%/, "", $NF);
printf("test coverage is %s%(quality gate is %s%)\n", $NF, target)
if (strtonum($NF) < target) {
printf("test coverage does not meet expectations: %d%, please add test cases!\n", target)
exit 1;
}
}
}