You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

coverage.awk 313 B

12345678910111213
  1. #!/usr/bin/env awk
  2. {
  3. print $0
  4. if (match($0, /^total:/)) {
  5. sub(/%/, "", $NF);
  6. printf("test coverage is %s%(quality gate is %s%)\n", $NF, target)
  7. if (strtonum($NF) < target) {
  8. printf("test coverage does not meet expectations: %d%, please add test cases!\n", target)
  9. exit 1;
  10. }
  11. }
  12. }