grntest 1.4.4 → 1.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.md +6 -0
- data/lib/grntest/executors/base-executor.rb +27 -14
- data/lib/grntest/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3903fe505e64094eb8951ddcca8e346e328da5a71c11eb2b9d30cca76618377a
|
4
|
+
data.tar.gz: f3dd540ee69267c74c6af70275f5a9630b9454bae75dce1ab6b8bf335efd80eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bec42dc8095c0f04ad0b3fb9c269e021b9986cf9a9cb606c37e39359a13f3fd0e63c5eaffb75d7881c62adc389be9ab8ff266005407377af604aadf6531fbc7c
|
7
|
+
data.tar.gz: 30c5648429bf14591dd25ee5eca20228303423db9e925204fdbedc4abafaf1d623237ed0d339f7120a76ab7c5ddd9bb9568d4b943ec4b6586ecc454656b460db
|
data/doc/text/news.md
CHANGED
@@ -44,6 +44,7 @@ module Grntest
|
|
44
44
|
@context = context
|
45
45
|
@custom_important_log_levels = []
|
46
46
|
@ignore_log_patterns = {}
|
47
|
+
@sleep_after_command = nil
|
47
48
|
end
|
48
49
|
|
49
50
|
def execute(script_path)
|
@@ -321,28 +322,28 @@ module Grntest
|
|
321
322
|
parser << "#{expand_variables(groonga_command)}\n"
|
322
323
|
end
|
323
324
|
|
324
|
-
def execute_directive_require_input_type(
|
325
|
+
def execute_directive_require_input_type(line, content, options)
|
325
326
|
input_type, = options
|
326
327
|
unless @context.input_type == input_type
|
327
328
|
omit("require input type: #{input_type}")
|
328
329
|
end
|
329
330
|
end
|
330
331
|
|
331
|
-
def execute_directive_require_testee(
|
332
|
+
def execute_directive_require_testee(line, content, options)
|
332
333
|
testee, = options
|
333
334
|
unless @context.testee == testee
|
334
335
|
omit("require testee: #{testee}")
|
335
336
|
end
|
336
337
|
end
|
337
338
|
|
338
|
-
def execute_directive_require_interface(
|
339
|
+
def execute_directive_require_interface(line, content, options)
|
339
340
|
interface, = options
|
340
341
|
unless @context.interface == interface
|
341
342
|
omit("require interface: #{interface}")
|
342
343
|
end
|
343
344
|
end
|
344
345
|
|
345
|
-
def execute_directive_require_apache_arrow(
|
346
|
+
def execute_directive_require_apache_arrow(line, content, options)
|
346
347
|
unless defined?(::Arrow)
|
347
348
|
omit("require Apache Arrow")
|
348
349
|
end
|
@@ -364,17 +365,17 @@ module Grntest
|
|
364
365
|
end
|
365
366
|
end
|
366
367
|
|
367
|
-
def execute_directive_add_ignore_log_pattern(
|
368
|
+
def execute_directive_add_ignore_log_pattern(line, content, options)
|
368
369
|
pattern = content.split(" ", 2)[1]
|
369
370
|
@ignore_log_patterns[pattern] = compile_pattern(pattern)
|
370
371
|
end
|
371
372
|
|
372
|
-
def execute_directive_remove_ignore_log_pattern(
|
373
|
+
def execute_directive_remove_ignore_log_pattern(line, content, options)
|
373
374
|
pattern = content.split(" ", 2)[1]
|
374
375
|
@ignore_log_patterns.delete(pattern)
|
375
376
|
end
|
376
377
|
|
377
|
-
def execute_directive_require_platform(
|
378
|
+
def execute_directive_require_platform(line, content, options)
|
378
379
|
platform, = options
|
379
380
|
if platform.start_with?("!")
|
380
381
|
if @context.platform == platform[1..-1]
|
@@ -387,6 +388,15 @@ module Grntest
|
|
387
388
|
end
|
388
389
|
end
|
389
390
|
|
391
|
+
def execute_directive_sleep_after_command(line, content, options)
|
392
|
+
if options[0]
|
393
|
+
time = options[0].to_f
|
394
|
+
else
|
395
|
+
time = nil
|
396
|
+
end
|
397
|
+
@sleep_after_command = time
|
398
|
+
end
|
399
|
+
|
390
400
|
def execute_directive(parser, line, content)
|
391
401
|
command, *options = Shellwords.split(content)
|
392
402
|
case command
|
@@ -423,19 +433,21 @@ module Grntest
|
|
423
433
|
when "eval"
|
424
434
|
execute_directive_eval(parser, line, content, options)
|
425
435
|
when "require-input-type"
|
426
|
-
execute_directive_require_input_type(
|
436
|
+
execute_directive_require_input_type(line, content, options)
|
427
437
|
when "require-testee"
|
428
|
-
execute_directive_require_testee(
|
438
|
+
execute_directive_require_testee(line, content, options)
|
429
439
|
when "require-interface"
|
430
|
-
execute_directive_require_interface(
|
440
|
+
execute_directive_require_interface(line, content, options)
|
431
441
|
when "require-apache-arrow"
|
432
|
-
execute_directive_require_apache_arrow(
|
442
|
+
execute_directive_require_apache_arrow(line, content, options)
|
433
443
|
when "add-ignore-log-pattern"
|
434
|
-
execute_directive_add_ignore_log_pattern(
|
444
|
+
execute_directive_add_ignore_log_pattern(line, content, options)
|
435
445
|
when "remove-ignore-log-pattern"
|
436
|
-
execute_directive_remove_ignore_log_pattern(
|
446
|
+
execute_directive_remove_ignore_log_pattern(line, content, options)
|
437
447
|
when "require-platform"
|
438
|
-
execute_directive_require_platform(
|
448
|
+
execute_directive_require_platform(line, content, options)
|
449
|
+
when "sleep-after-command"
|
450
|
+
execute_directive_sleep_after_command(line, content, options)
|
439
451
|
else
|
440
452
|
log_input(line)
|
441
453
|
log_error("#|e| unknown directive: <#{command}>")
|
@@ -501,6 +513,7 @@ module Grntest
|
|
501
513
|
else
|
502
514
|
type = @output_type
|
503
515
|
log_output(response)
|
516
|
+
sleep(@sleep_after_command) if @sleep_after_command
|
504
517
|
log_error(extract_important_messages(read_all_log))
|
505
518
|
log_query_log_content(read_all_query_log)
|
506
519
|
|
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.4.
|
4
|
+
version: 1.4.5
|
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: 2020-
|
12
|
+
date: 2020-11-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: diff-lcs
|
@@ -270,7 +270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
270
270
|
- !ruby/object:Gem::Version
|
271
271
|
version: '0'
|
272
272
|
requirements: []
|
273
|
-
rubygems_version: 3.2.0.
|
273
|
+
rubygems_version: 3.2.0.rc.2
|
274
274
|
signing_key:
|
275
275
|
specification_version: 4
|
276
276
|
summary: Grntest is a testing framework for Groonga. You can write a test for Groonga
|