grntest 1.1.7 → 1.1.8
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/execution-context.rb +7 -3
- data/lib/grntest/executors/base-executor.rb +15 -0
- data/lib/grntest/executors/standard-io-executor.rb +1 -0
- data/lib/grntest/test-runner.rb +1 -0
- data/lib/grntest/tester.rb +12 -0
- data/lib/grntest/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ca500bff8db5b5d6ced1134c9ffebdd4a5bfa30
|
4
|
+
data.tar.gz: 4f44310da7edac112cad7a4f0bd4f41d954f0a75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b0ac506e42326ccf496c46b840936bc6ab03b898706b0c0aa13f7c9c77a0851750601870591a32745cff1a868d8f1eccec773c81c4efe6ff2f5b37954f96979
|
7
|
+
data.tar.gz: 7eb826ce2087e090c7652443ffc1f9a907571b4b137c18e03d21e5039e1adf5cced7e61a2a8f481636058c30e4f724553efc9e0a33e5966826dfa152b26c5b00
|
data/doc/text/news.md
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
# Copyright (C) 2012-2015 Kouhei Sutou <kou@clear-code.com>
|
1
|
+
# Copyright (C) 2012-2016 Kouhei Sutou <kou@clear-code.com>
|
4
2
|
#
|
5
3
|
# This program is free software: you can redistribute it and/or modify
|
6
4
|
# it under the terms of the GNU General Public License as published by
|
@@ -25,6 +23,7 @@ module Grntest
|
|
25
23
|
attr_accessor :on_error
|
26
24
|
attr_accessor :abort_tag
|
27
25
|
attr_writer :collect_query_log
|
26
|
+
attr_writer :debug
|
28
27
|
def initialize
|
29
28
|
@logging = true
|
30
29
|
@base_directory = Pathname(".")
|
@@ -40,6 +39,7 @@ module Grntest
|
|
40
39
|
@abort_tag = nil
|
41
40
|
@omitted = false
|
42
41
|
@collect_query_log = false
|
42
|
+
@debug = false
|
43
43
|
end
|
44
44
|
|
45
45
|
def logging?
|
@@ -50,6 +50,10 @@ module Grntest
|
|
50
50
|
@collect_query_log
|
51
51
|
end
|
52
52
|
|
53
|
+
def debug?
|
54
|
+
@debug
|
55
|
+
end
|
56
|
+
|
53
57
|
def execute
|
54
58
|
@n_nested += 1
|
55
59
|
yield
|
@@ -408,6 +408,7 @@ module Grntest
|
|
408
408
|
content << read_content
|
409
409
|
timeout = 0 if read_content.bytesize < request_bytes
|
410
410
|
end
|
411
|
+
debug_output(content)
|
411
412
|
content
|
412
413
|
end
|
413
414
|
|
@@ -484,6 +485,20 @@ module Grntest
|
|
484
485
|
end
|
485
486
|
end
|
486
487
|
|
488
|
+
def debug_input(input)
|
489
|
+
return unless @context.debug?
|
490
|
+
$stderr.puts("> #{input}")
|
491
|
+
end
|
492
|
+
|
493
|
+
def debug_output(output)
|
494
|
+
if @context.debug?
|
495
|
+
output.each_line do |line|
|
496
|
+
$stderr.puts("< #{line}")
|
497
|
+
end
|
498
|
+
end
|
499
|
+
output
|
500
|
+
end
|
501
|
+
|
487
502
|
def default_timeout
|
488
503
|
3
|
489
504
|
end
|
data/lib/grntest/test-runner.rb
CHANGED
@@ -135,6 +135,7 @@ module Grntest
|
|
135
135
|
context.groonga_suggest_create_dataset =
|
136
136
|
@tester.groonga_suggest_create_dataset
|
137
137
|
context.output_type = @tester.output_type
|
138
|
+
context.debug = @tester.debug?
|
138
139
|
run_groonga(context) do |executor|
|
139
140
|
begin
|
140
141
|
Timeout.timeout(@tester.timeout) do
|
data/lib/grntest/tester.rb
CHANGED
@@ -212,6 +212,12 @@ module Grntest
|
|
212
212
|
tester.timeout = timeout
|
213
213
|
end
|
214
214
|
|
215
|
+
parser.on("--[no-]debug",
|
216
|
+
"Enable debug information",
|
217
|
+
"(#{tester.debug?})") do |debug|
|
218
|
+
tester.debug = debug
|
219
|
+
end
|
220
|
+
|
215
221
|
parser.on("--version",
|
216
222
|
"Show version and exit") do
|
217
223
|
puts(VERSION)
|
@@ -258,6 +264,7 @@ module Grntest
|
|
258
264
|
attr_writer :reporter, :keep_database, :use_color
|
259
265
|
attr_writer :stop_on_failure
|
260
266
|
attr_writer :suppress_omit_log
|
267
|
+
attr_writer :debug
|
261
268
|
attr_reader :test_patterns, :test_suite_patterns
|
262
269
|
attr_reader :exclude_test_patterns, :exclude_test_suite_patterns
|
263
270
|
def initialize
|
@@ -279,6 +286,7 @@ module Grntest
|
|
279
286
|
@use_color = nil
|
280
287
|
@stop_on_failure = false
|
281
288
|
@suppress_omit_log = true
|
289
|
+
@debug = false
|
282
290
|
@test_patterns = []
|
283
291
|
@test_suite_patterns = []
|
284
292
|
@exclude_test_patterns = []
|
@@ -328,6 +336,10 @@ module Grntest
|
|
328
336
|
@suppress_omit_log
|
329
337
|
end
|
330
338
|
|
339
|
+
def debug?
|
340
|
+
@debug
|
341
|
+
end
|
342
|
+
|
331
343
|
def valgrind_gen_suppressions?
|
332
344
|
@valgrind_gen_suppressions
|
333
345
|
end
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
@@ -223,8 +223,8 @@ specification_version: 4
|
|
223
223
|
summary: Grntest is a testing framework for Groonga. You can write a test for Groonga
|
224
224
|
by writing Groonga commands and expected result.
|
225
225
|
test_files:
|
226
|
-
- test/test
|
226
|
+
- test/run-test.rb
|
227
227
|
- test/executors/test-base-executor.rb
|
228
228
|
- test/executors/test-standard-io-executor.rb
|
229
|
-
- test/
|
229
|
+
- test/test-log-parser.rb
|
230
230
|
has_rdoc:
|