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.

23 lines
731 B

  1. #!/bin/bash
  2. set -e
  3. this_script="$(realpath "${BASH_SOURCE[0]}")"
  4. script_dir="$(realpath "$(dirname "$this_script")")"
  5. qmk_firmware_dir="$(realpath "$script_dir/../../")"
  6. dump_failure_info() {
  7. local failure_file="$1"
  8. local keyboard=$(cat "$failure_file" | grep 'CI Metadata: KEYBOARD=' | cut -d= -f2)
  9. local keymap=$(cat "$failure_file" | grep 'CI Metadata: KEYMAP=' | cut -d= -f2)
  10. echo "## ${keyboard}:${keymap}"
  11. echo "\`\`\`"
  12. cat "$failure_file" | sed -e $'s/\x1b\[[0-9;]*m//g' | grep -v "CI Metadata:" | grep -vP "(Entering|Leaving) directory"
  13. echo "\`\`\`"
  14. }
  15. for failure_file in $(find "$qmk_firmware_dir/.build" -name 'failed.log.*' | sort); do
  16. dump_failure_info "$failure_file"
  17. done
  18. exit 0