xcodebuild.awk 502 B

123456789101112131415161718192021222324252627282930313233343536
  1. # Exit statuses:
  2. #
  3. # 0 - No errors found.
  4. # 1 - Build or test failure. Errors will be logged automatically.
  5. # 2 - Untestable target. Retry with the "build" action.
  6. BEGIN {
  7. status = 0;
  8. }
  9. {
  10. print;
  11. fflush(stdout);
  12. }
  13. /is not valid for Testing/ {
  14. exit 2;
  15. }
  16. /[0-9]+: (error|warning):/ {
  17. errors = errors $0 "\n";
  18. }
  19. /(TEST|BUILD) FAILED/ {
  20. status = 1;
  21. }
  22. END {
  23. if (length(errors) > 0) {
  24. print "\n*** All errors:\n" errors;
  25. }
  26. fflush(stdout);
  27. exit status;
  28. }