grntest 1.1.5 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/doc/text/news.md +6 -0
- data/lib/grntest/test-runner.rb +9 -1
- data/lib/grntest/tester.rb +8 -0
- data/lib/grntest/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5aee9882d86b34a5b1784921890c57144b581daa
|
4
|
+
data.tar.gz: 07030943c58f7d7d76d0713d555c536dda782961
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6dc4dc972ad6a914839427cb165e4a08c76a9ee3ee63d25d89a680d74fcd41fc665f487851d9b94e24c534246299bb551bcb4d24cd1478e72d4c72eb79d10ed
|
7
|
+
data.tar.gz: 4e90459f4b0b42412cb9d2215225ea42d9899388ed797182627881a52275b5e5fa70fb3d4c41d92045ace87d1f2b953ad8f12dc5a0b5c6207697137c9c094172
|
data/doc/text/news.md
CHANGED
data/lib/grntest/test-runner.rb
CHANGED
@@ -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
|
-
|
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?
|
data/lib/grntest/tester.rb
CHANGED
@@ -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)
|
data/lib/grntest/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2016-04-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|