grntest 1.3.6 → 1.3.7
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 +8 -0
- data/lib/grntest/executors/base-executor.rb +38 -0
- data/lib/grntest/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ba7e05aef3a6c662712ec931374dfb8889222eddc6716bc0c9efa0cf99cd882
|
4
|
+
data.tar.gz: 4d76ffcdfb0303b4935e06ac32001d07ed3ad2c6c12c66a886fcace730dd0255
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0f98a7f12095cd875f90ef991c1a22a5de95dd107d315f2175928fa0cfa7292da7578bd2ab6a8292c876073d62ef9cb571ab3d00908702ed4a60dd945fb5019
|
7
|
+
data.tar.gz: f4a82f9a8dd26a01d2a9c1f21f26a1a6d8d265f5722c149f271cb4ee9bf6fe2dcd7f1517a950e751ddee3222dddd8e475332b874750f7ba9e56923e5f4cd7b28
|
data/doc/text/news.md
CHANGED
@@ -43,6 +43,7 @@ module Grntest
|
|
43
43
|
@long_read_timeout = default_long_read_timeout
|
44
44
|
@context = context
|
45
45
|
@custom_important_log_levels = []
|
46
|
+
@ignore_log_patterns = {}
|
46
47
|
end
|
47
48
|
|
48
49
|
def execute(script_path)
|
@@ -347,6 +348,32 @@ module Grntest
|
|
347
348
|
end
|
348
349
|
end
|
349
350
|
|
351
|
+
def compile_pattern(pattern)
|
352
|
+
case pattern
|
353
|
+
when /\A\/(.*)\/([ixm]*)?\z/
|
354
|
+
content = $1
|
355
|
+
options = $2
|
356
|
+
regexp_flags = 0
|
357
|
+
regexp_flags |= Regexp::IGNORECASE if options.include?("i")
|
358
|
+
regexp_flags |= Regexp::EXTENDED if options.include?("x")
|
359
|
+
regexp_flags |= Regexp::MULTILINE if options.include?("m")
|
360
|
+
Regexp.new(content, regexp_flags)
|
361
|
+
else
|
362
|
+
log_error("# error: invalid pattern: #{pattern}")
|
363
|
+
@context.error
|
364
|
+
end
|
365
|
+
end
|
366
|
+
|
367
|
+
def execute_directive_add_ignore_log_pattern(parser, line, content, options)
|
368
|
+
pattern = content.split(" ", 2)[1]
|
369
|
+
@ignore_log_patterns[pattern] = compile_pattern(pattern)
|
370
|
+
end
|
371
|
+
|
372
|
+
def execute_directive_remove_ignore_log_pattern(parser, line, content, options)
|
373
|
+
pattern = content.split(" ", 2)[1]
|
374
|
+
@ignore_log_patterns.delete(pattern)
|
375
|
+
end
|
376
|
+
|
350
377
|
def execute_directive(parser, line, content)
|
351
378
|
command, *options = Shellwords.split(content)
|
352
379
|
case command
|
@@ -390,6 +417,10 @@ module Grntest
|
|
390
417
|
execute_directive_require_interface(parser, line, content, options)
|
391
418
|
when "require-apache-arrow"
|
392
419
|
execute_directive_require_apache_arrow(parser, line, content, options)
|
420
|
+
when "add-ignore-log-pattern"
|
421
|
+
execute_directive_add_ignore_log_pattern(parser, line, content, options)
|
422
|
+
when "remove-ignore-log-pattern"
|
423
|
+
execute_directive_remove_ignore_log_pattern(parser, line, content, options)
|
393
424
|
else
|
394
425
|
log_input(line)
|
395
426
|
log_error("#|e| unknown directive: <#{command}>")
|
@@ -503,6 +534,7 @@ module Grntest
|
|
503
534
|
next if !in_crash and backtrace_log_message?(entry.message)
|
504
535
|
end
|
505
536
|
next if thread_log_message?(entry.message)
|
537
|
+
next if ignore_log_message?(entry.message)
|
506
538
|
formatted_log_level = format_log_level(entry.log_level)
|
507
539
|
important_messages << "\#|#{formatted_log_level}| #{entry.message}"
|
508
540
|
end
|
@@ -592,6 +624,12 @@ module Grntest
|
|
592
624
|
end
|
593
625
|
end
|
594
626
|
|
627
|
+
def ignore_log_message?(message)
|
628
|
+
@ignore_log_patterns.any? do |_pattern, regexp|
|
629
|
+
regexp === message
|
630
|
+
end
|
631
|
+
end
|
632
|
+
|
595
633
|
def error_response?(response, type)
|
596
634
|
status = nil
|
597
635
|
begin
|
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.3.
|
4
|
+
version: 1.3.7
|
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-03-
|
12
|
+
date: 2020-03-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: diff-lcs
|