File tree Expand file tree Collapse file tree 2 files changed +17
-20
lines changed
elasticsearch-api/spec/yaml-test-runner Expand file tree Collapse file tree 2 files changed +17
-20
lines changed Original file line number Diff line number Diff line change @@ -8,27 +8,19 @@ 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- buildkite-agent annotate --append "
12- :ruby: $RUBY_VERSION :test_tube:
13- "
11+ TRANSPORT_VERSION=` echo $f | grep -Po " (transport-|\d+\.)+" | grep transport`
12+ buildkite-agent annotate --append " :ruby: $RUBY_VERSION :phone: $TRANSPORT_VERSION :test_tube:\n"
13+
14+ FAILED_TESTS=` grep " E," $f `
15+ if [[ -n " $FAILED_TESTS " ]]; then
16+ buildkite-agent annotate --append " #### Failures in $f "
17+ buildkite-agent annotate --append ` grep " E," tmp/es-9.0.0-transport-8.3-jruby-9.4.8.0.log | awk -F ' -- :' ' {print $2}' `
18+ fi
19+
20+ # Summary:
1421 #
1522 # We need the second part of the logs, so we use "-- :" as a field separator in awk
1623 # I, [2024-11-19T09:54:00.190519 #342490] INFO -- : ⏲ Elapsed time: 00:01:31
1724 #
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
25+ buildkite-agent annotate --apend ` tail -2 $f | awk -F " -- :" ' {print $2}' `
3426done
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_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