aosp12/external/guava/util/print_surefire_reports.sh

15 lines
366 B
Bash
Raw Permalink Normal View History

2023-01-09 17:11:35 +08:00
#!/bin/bash
set -eu
# Ignore passing tests.
files=($(
grep -e 'failures=.[^0]' -e 'errors=.[^0]' {android/,}*/target/surefire-reports/*.xml -l |
sed -e 's/TEST-//; s/.xml$//'))
for file in "${files[@]}"; do
# Dump file-output.txt and file.txt.
# Use tail to include a filename header before each (and maybe truncate).
tail -n 9999 "${file}"*.txt
done