File tree Expand file tree Collapse file tree 2 files changed +17
-18
lines changed
elasticsearch-api/spec/yaml-test-runner Expand file tree Collapse file tree 2 files changed +17
-18
lines changed Original file line number Diff line number Diff line change @@ -8,27 +8,21 @@ buildkite-agent artifact download "elasticsearch-api/tmp/*" .
88files=" elasticsearch-api/tmp/*.log"
99for f in $files ; do
1010 RUBY_VERSION=` echo $f | grep -Po " (j?ruby-|\d+\.)+\d+" | tail -1`
11+ TRANSPORT_VERSION=` echo $f | grep -Po " transport-([\d.]+)" `
1112 buildkite-agent annotate --append "
12- :ruby: $RUBY_VERSION :test_tube:
13+ :ruby: $RUBY_VERSION :phone: $TRANSPORT_VERSION : test_tube:
1314"
15+
16+ FAILED_TESTS=` grep " E," $f `
17+ if [[ -n " $FAILED_TESTS " ]]; then
18+ buildkite-agent annotate --append " #### Failures in $f "
19+ buildkite-agent annotate --append ` grep " E," tmp/es-9.0.0-transport-8.3-jruby-9.4.8.0.log | awk -F ' -- :' ' {print $2}' `
20+ fi
21+
22+ # Summary:
1423 #
1524 # We need the second part of the logs, so we use "-- :" as a field separator in awk
1625 # I, [2024-11-19T09:54:00.190519 #342490] INFO -- : ⏲ Elapsed time: 00:01:31
1726 #
18- buildkite-agent annotate --apend ` awk -F " -- :" ' {print $2}' $f `
19-
20- # TODO: Failed tests:
21- FAILED_TESTS=` awk ' BEGIN { FS = " | "}; /\| failed \|/{ print $1 }' $f | uniq`
22- if [[ -n " $FAILED_TESTS " ]]; then
23- buildkite-agent annotate --append "
24- #### Failures in $f
25- "
26- FAILURES_ARRAY=($( echo $FAILED_TESTS | tr ' ' " \n" ) )
27- for f in " ${FAILURES_ARRAY[@]} "
28- do
29- buildkite-agent annotate --append "
30- - $f
31- "
32- done
33- fi
27+ tail -2 $f | awk -F " -- :" ' {print $2}' | xargs buildkite-agent annotate --append
3428done
Original file line number Diff line number Diff line change 5656 end
5757
5858tests_path = File . expand_path ( './tmp' , __dir__ )
59- log_filename = "es-#{ Elasticsearch ::VERSION } -transport-#{ ENV [ 'TRANSPORT_VERSION' ] } -#{ ENV [ 'RUBY_SOURCE' ] } -#{ ENV [ 'RUBY_VERSION' ] } .log"
59+ ruby_version = if defined? JRUBY_VERSION
60+ "jruby-#{ JRUBY_VERSION } "
61+ else
62+ "ruby-#{ RUBY_VERSION } "
63+ end
64+ log_filename = "es-#{ Elasticsearch ::VERSION } -transport-#{ ENV [ 'TRANSPORT_VERSION' ] } -#{ ruby_version } .log"
6065logfile = File . expand_path "../../tmp/#{ log_filename } " , __dir__
6166logger = Logger . new ( File . open ( logfile , 'w' ) )
6267logger . level = ENV [ 'DEBUG' ] ? Logger ::DEBUG : Logger ::WARN
You can’t perform that action at this time.
0 commit comments