@@ -5,33 +5,18 @@ buildkite-agent annotate --style info "## :rspec: Tests summary :rspec:
55"
66buildkite-agent artifact download " elasticsearch-api/tmp/*" .
77
8- # Test result summary:
9- files=" elasticsearch-api/tmp/*.html"
8+ files=" elasticsearch-api/tmp/*.log"
109for f in $files ; do
11- TEST_SUITE=` echo $f | grep -o " \(free\|platinum\)" `
12- RUBY_VERSION=` echo $f | grep -Po " (jruby-|\d+\.)+\d+" `
13- EXAMPLES=` cat $f | grep -o " [0-9]\+ examples\?" | tail -1`
14- FAILURES=` cat $f | grep -o " [0-9]\+ failures\?" | tail -1`
15- PENDING=` cat $f | grep -o " [0-9]\+ pending" | tail -1`
10+ RUBY_VERSION=` echo $f | grep -Po " (j?ruby-|\d+\.)+\d+" | tail -1`
11+ TRANSPORT_VERSION=` echo $f | grep -Po " transport-([\d.]+|main)" `
1612 buildkite-agent annotate --append "
17- :ruby: $RUBY_VERSION :test_tube: $TEST_SUITE :rspec: $EXAMPLES - :x: $FAILURES - :suspect: $PENDING
13+ :ruby: $RUBY_VERSION :phone: $TRANSPORT_VERSION ` tail --lines=2 $f | awk -F " -- :" ' {print $2}' `
14+
1815"
19- done
2016
21- # Failed tests:
22- files=" elasticsearch-api/tmp/*.log"
23- for f in $files ; do
24- FAILED_TESTS=` awk ' BEGIN { FS = " | "}; /\| failed \|/{ print $1 }' $f | uniq`
17+ FAILED_TESTS=` grep " E," $f `
2518 if [[ -n " $FAILED_TESTS " ]]; then
26- buildkite-agent annotate --append "
27- #### Failures in $f
28- "
29- FAILURES_ARRAY=($( echo $FAILED_TESTS | tr ' ' " \n" ) )
30- for f in " ${FAILURES_ARRAY[@]} "
31- do
32- buildkite-agent annotate --append "
33- - $f
34- "
35- done
19+ buildkite-agent annotate --append " #### Failures in $f "
20+ buildkite-agent annotate --append ` grep " E," $f | awk -F ' -- :' ' {print $2}' `
3621 fi
3722done
0 commit comments