File tree Expand file tree Collapse file tree 3 files changed +12
-13
lines changed
elasticsearch-api/spec/yaml-test-runner Expand file tree Collapse file tree 3 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -5,22 +5,19 @@ 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`
1611 buildkite-agent annotate --append "
17- :ruby: $RUBY_VERSION :test_tube: $TEST_SUITE :rspec: $EXAMPLES - :x: $FAILURES - :suspect: $PENDING
12+ :ruby: $RUBY_VERSION :test_tube:
1813"
19- done
14+ #
15+ # We need the second part of the logs, so we use "-- :" as a field separator in awk
16+ # I, [2024-11-19T09:54:00.190519 #342490] INFO -- : ⏲ Elapsed time: 00:01:31
17+ #
18+ buildkite-agent annotate --apend ` awk -F " -- :" ' {print $2}' $f `
2019
21- # Failed tests:
22- files=" elasticsearch-api/tmp/*.log"
23- for f in $files ; do
20+ # TODO: Failed tests:
2421 FAILED_TESTS=` awk ' BEGIN { FS = " | "}; /\| failed \|/{ print $1 }' $f | uniq`
2522 if [[ -n " $FAILED_TESTS " ]]; then
2623 buildkite-agent annotate --append "
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ docker run \
3737 --env " TRANSPORT_VERSION=${TRANSPORT_VERSION} " \
3838 --env " STACK_VERSION=${STACK_VERSION} " \
3939 --env " ES_YAML_TESTS_BRANCH=${ES_YAML_TESTS_BRANCH} " \
40+ --env " DEBUG=${DEBUG} " \
4041 --volume $repo :/usr/src/app \
4142 --name elasticsearch-ruby \
4243 --rm \
Original file line number Diff line number Diff line change 5656 end
5757
5858tests_path = File . expand_path ( './tmp' , __dir__ )
59- logfile = File . expand_path "../../tmp/tests-#{ Elasticsearch ::VERSION } -transport-#{ ENV [ 'TRANSPORT_VERSION' ] } -ruby-#{ ENV [ 'RUBY_VERSION' ] } .log" , __dir__
59+ log_filename = "es-#{ Elasticsearch ::VERSION } -transport-#{ ENV [ 'TRANSPORT_VERSION' ] } -#{ ENV [ 'RUBY_SOURCE' ] } -#{ ENV [ 'RUBY_VERSION' ] } .log"
60+ logfile = File . expand_path "../../tmp/#{ log_filename } " , __dir__
6061logger = Logger . new ( File . open ( logfile , 'w' ) )
6162logger . level = ENV [ 'DEBUG' ] ? Logger ::DEBUG : Logger ::WARN
6263
You can’t perform that action at this time.
0 commit comments