grntest 1.1.5 → 1.1.6

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
  SHA1:
3
- metadata.gz: 7713d127d2264d3f7a6f36b79098ca244199979e
4
- data.tar.gz: 70949fc8571486a393363cb60ff427a1f7846cd3
3
+ metadata.gz: 5aee9882d86b34a5b1784921890c57144b581daa
4
+ data.tar.gz: 07030943c58f7d7d76d0713d555c536dda782961
5
5
  SHA512:
6
- metadata.gz: e69d872e3a661ff0fb5001a72d3e786e1afa7d16d74c57dadeb33e44892cdde3f8b216c011fdda2f2ae3415af0f364c0c1092206c3f9f263774e58930a57a44c
7
- data.tar.gz: ff16fa168781e0af31ce27d6ab73e306f12465ce91a6d4f324ddbcabccab17ce4c6632c8a2e6bbf7677a1cdc85b1b8b3740d4a01728484207c5c4cba6938e840
6
+ metadata.gz: f6dc4dc972ad6a914839427cb165e4a08c76a9ee3ee63d25d89a680d74fcd41fc665f487851d9b94e24c534246299bb551bcb4d24cd1478e72d4c72eb79d10ed
7
+ data.tar.gz: 4e90459f4b0b42412cb9d2215225ea42d9899388ed797182627881a52275b5e5fa70fb3d4c41d92045ace87d1f2b953ad8f12dc5a0b5c6207697137c9c094172
data/doc/text/news.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # News
2
2
 
3
+ ## 1.1.6: 2016-04-27
4
+
5
+ ### Improvements
6
+
7
+ * Added `--timeout` option.
8
+
3
9
  ## 1.1.5: 2016-04-26
4
10
 
5
11
  ### Fixes
@@ -16,6 +16,7 @@
16
16
  require "pathname"
17
17
  require "fileutils"
18
18
  require "tempfile"
19
+ require "timeout"
19
20
 
20
21
  require "json"
21
22
 
@@ -135,7 +136,14 @@ module Grntest
135
136
  @tester.groonga_suggest_create_dataset
136
137
  context.output_type = @tester.output_type
137
138
  run_groonga(context) do |executor|
138
- executor.execute(test_script_path)
139
+ begin
140
+ Timeout.timeout(@tester.timeout) do
141
+ executor.execute(test_script_path)
142
+ end
143
+ rescue Timeout::Error
144
+ message = "# error: timeout (#{@tester.timeout}s)"
145
+ context.result << [:error, message, {}]
146
+ end
139
147
  end
140
148
  check_memory_leak(context)
141
149
  result.omitted = context.omitted?
@@ -206,6 +206,12 @@ module Grntest
206
206
  tester.use_color = use_color
207
207
  end
208
208
 
209
+ parser.on("--timeout=SECOND", Float,
210
+ "Timeout for each test",
211
+ "(#{tester.timeout})") do |timeout|
212
+ tester.timeout = timeout
213
+ end
214
+
209
215
  parser.on("--version",
210
216
  "Show version and exit") do
211
217
  puts(VERSION)
@@ -247,6 +253,7 @@ module Grntest
247
253
  attr_accessor :output
248
254
  attr_accessor :gdb, :default_gdb
249
255
  attr_accessor :valgrind, :default_valgrind
256
+ attr_accessor :timeout
250
257
  attr_writer :valgrind_gen_suppressions
251
258
  attr_writer :reporter, :keep_database, :use_color
252
259
  attr_writer :stop_on_failure
@@ -279,6 +286,7 @@ module Grntest
279
286
  detect_suitable_diff
280
287
  initialize_debuggers
281
288
  initialize_memory_checkers
289
+ @timeout = 5
282
290
  end
283
291
 
284
292
  def run(*targets)
@@ -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.1.5"
17
+ VERSION = "1.1.6"
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.1.5
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-04-26 00:00:00.000000000 Z
12
+ date: 2016-04-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json