Skip to content

Commit cb5271c

Browse files
committed
debug
1 parent e9c38f0 commit cb5271c

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

.buildkite/log-results.sh

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,23 @@ buildkite-agent artifact download "elasticsearch-api/tmp/*" .
88
files="elasticsearch-api/tmp/*.log"
99
for 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:
14+
15+
`tail --lines=2 $f | awk -F "-- :" '{print $2}'`
1316
"
17+
18+
FAILED_TESTS=`grep "E," $f`
19+
if [[ -n "$FAILED_TESTS" ]]; then
20+
buildkite-agent annotate --append "#### Failures in $f "
21+
buildkite-agent annotate --append `grep "E," tmp/es-9.0.0-transport-8.3-jruby-9.4.8.0.log | awk -F '-- :' '{print $2}'`
22+
fi
23+
24+
# Summary:
1425
#
1526
# We need the second part of the logs, so we use "-- :" as a field separator in awk
1627
# I, [2024-11-19T09:54:00.190519 #342490] INFO -- : ⏲ Elapsed time: 00:01:31
1728
#
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
29+
tail --lines=2 $f | awk -F "-- :" '{print $2}' | xargs buildkite-agent annotate --append
3430
done

elasticsearch-api/spec/yaml-test-runner/run.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@
5656
end
5757

5858
tests_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"
6065
logfile = File.expand_path "../../tmp/#{log_filename}", __dir__
6166
logger = Logger.new(File.open(logfile, 'w'))
6267
logger.level = ENV['DEBUG'] ? Logger::DEBUG : Logger::WARN

0 commit comments

Comments
 (0)