Skip to content

Commit a547e3b

Browse files
committed
debug
1 parent e9c38f0 commit a547e3b

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

.buildkite/log-results.sh

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,21 @@ 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+\.)+" | grep transport`
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 --apend
3428
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_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)