grntest 1.6.7 → 1.6.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12f28c481c54a3e79b70ea062f4a76cbe821be0fa01b1f2a8f1fd29a2b79f908
4
- data.tar.gz: 249e018b5bc5b04c5feee893cc40f63eef866385a9939f163d4609d0034c7a0f
3
+ metadata.gz: 874f9b46d80e926dac44a36947f89cb2f8fee99a1e00ae1063b5e3d79b07d706
4
+ data.tar.gz: 44643f5dc0b404cbfde294a218f19a0251afef70c01ae6d8a9ab3130556af3e3
5
5
  SHA512:
6
- metadata.gz: 24448978ee6df568c410eb1a48a270d53394f95a0b260e1c231054eb5cb5c7e01f23b90497ae2a2f4883454e1ddcdafb0335b87e1faad50483578738c32083ff
7
- data.tar.gz: 901048e9ff04caa10dddb3e40a538382ba66bf8b9641e182957fd2c53e1174cfc3e21046eed1eb95f6986fcbcf5ba83d67533201d3b11bb53c8cbd0f1004be17
6
+ metadata.gz: 13b411cbd6573214a097ca372a9e0a810b81c485dd4a241030996f3030561082a82939f278417ec2eb213e64505a9dab4c693130403ee30c557cc73b58f9915e
7
+ data.tar.gz: 7ae1e11e823be0eda76acc7e0af1f11d168e2859287c4cfb435ffd69b0dd034a6065befab670997972eca56dbb1d769e8756705edc505bb51a3cf42f6e8a8abd
data/doc/text/news.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # News
2
2
 
3
+ ## 1.6.9: 2024-02-05
4
+
5
+ ### Improvements
6
+
7
+ * reporter: benchmark-json: Added a test suite name to benchmark name.
8
+
9
+ ## 1.6.8: 2024-02-05
10
+
11
+ ### Fixes
12
+
13
+ * reporter: benchmark-json: Fixed a bug that invalid JSON is
14
+ generated.
15
+
3
16
  ## 1.6.7: 2024-02-05
4
17
 
5
18
  ### Improvements
@@ -28,7 +28,7 @@ module Grntest
28
28
  def on_start(result)
29
29
  puts(<<-JSON)
30
30
  {
31
- "context": {"
31
+ "context": {
32
32
  "date": #{Time.now.iso8601.to_json},
33
33
  "host_name": #{Socket.gethostname.to_json},
34
34
  "executable": #{@tester.testee.to_json},
@@ -60,6 +60,12 @@ module Grntest
60
60
  end
61
61
 
62
62
  def on_test_failure(worker, result)
63
+ output, @output = @output, $stderr
64
+ begin
65
+ report_failure(result)
66
+ ensure
67
+ @output = output
68
+ end
63
69
  end
64
70
 
65
71
  def on_test_leak(worker, result)
@@ -74,16 +80,17 @@ module Grntest
74
80
  def on_test_finish(worker, result)
75
81
  return if result.benchmarks.empty?
76
82
  benchmarks = result.benchmarks.collect do |benchmark|
83
+ name = "#{worker.suite_name}/#{result.test_name}"
77
84
  <<-JSON.chomp
78
85
  {
79
- "name": #{result.test_name.to_json},
86
+ "name": #{name.to_json},
80
87
  "run_name": #{benchmark.name.to_json},
81
88
  "run_type": "iteration",
82
89
  "iterations": #{benchmark.n_iterations},
83
90
  "real_time": #{benchmark.real_elapsed_time},
84
91
  "cpu_time": #{benchmark.cpu_elapsed_time},
85
92
  "time_unit": "s",
86
- "items_per_second": #{benchmark.items_per_second},
93
+ "items_per_second": #{benchmark.items_per_second}
87
94
  }
88
95
  JSON
89
96
  end
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2012-2023 Sutou Kouhei <kou@clear-code.com>
1
+ # Copyright (C) 2012-2024 Sutou Kouhei <kou@clear-code.com>
2
2
  #
3
3
  # This program is free software: you can redistribute it and/or modify
4
4
  # it under the terms of the GNU General Public License as published by
@@ -14,5 +14,5 @@
14
14
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
15
 
16
16
  module Grntest
17
- VERSION = "1.6.7"
17
+ VERSION = "1.6.9"
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grntest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.7
4
+ version: 1.6.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou