grntest 1.3.8 → 1.4.3
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 +39 -0
- data/lib/grntest/execution-context.rb +15 -0
- data/lib/grntest/executors/base-executor.rb +21 -2
- data/lib/grntest/reporters.rb +4 -3
- data/lib/grntest/reporters/progress-reporter.rb +37 -0
- data/lib/grntest/test-runner.rb +26 -0
- data/lib/grntest/tester.rb +8 -2
- data/lib/grntest/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84355faab0bb4ff5b7dbe5f1ef43a0ca2c93203fcd99b56282d0800a222a976e
|
4
|
+
data.tar.gz: c289cb84bdf272373db014e586ecfcb1ea9d3961ea48e6f6958bc430e1f493ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d71f9f4c07114875886817223c31c10309cfea941aafcef780fc34d3366688cccf6df1c36287b1b9019faa9d2727f6918267fa2758e040673145e230faa88080
|
7
|
+
data.tar.gz: 50627e7af040b161e34a6d2b756f4642940fb7b8a2fffbd0c1751d0fb9b240fa27a0c975ca6c57023f5a90c92616d7bb263497192d875040e17d68121da708ac
|
data/doc/text/news.md
CHANGED
@@ -1,5 +1,44 @@
|
|
1
1
|
# News
|
2
2
|
|
3
|
+
## 1.4.3: 2020-05-31
|
4
|
+
|
5
|
+
### Improvements
|
6
|
+
|
7
|
+
* Removed log normalization.
|
8
|
+
|
9
|
+
## 1.4.2: 2020-05-30
|
10
|
+
|
11
|
+
### Improvements
|
12
|
+
|
13
|
+
* Removed log level normalization.
|
14
|
+
|
15
|
+
* Added `require-platform` directive.
|
16
|
+
|
17
|
+
* Added support for normalizing IO open/close log message with
|
18
|
+
additional message.
|
19
|
+
|
20
|
+
## 1.4.1: 2020-05-30
|
21
|
+
|
22
|
+
### Improvements
|
23
|
+
|
24
|
+
* Added support for normalizing IO open/close log message.
|
25
|
+
|
26
|
+
## 1.4.0: 2020-05-16
|
27
|
+
|
28
|
+
### Improvements
|
29
|
+
|
30
|
+
* Added support for normalizing mruby's syntax error message.
|
31
|
+
|
32
|
+
## 1.3.9: 2020-05-09
|
33
|
+
|
34
|
+
### Improvements
|
35
|
+
|
36
|
+
* Added `progress` reporter.
|
37
|
+
|
38
|
+
* Suppressed Apache Arrow related reports from Valgrind.
|
39
|
+
|
40
|
+
* Improved backtrace detection.
|
41
|
+
|
3
42
|
## 1.3.8: 2020-04-23
|
4
43
|
|
5
44
|
### Improvements
|
@@ -37,6 +37,7 @@ module Grntest
|
|
37
37
|
attr_writer :suppress_backtrace
|
38
38
|
attr_writer :collect_query_log
|
39
39
|
attr_writer :debug
|
40
|
+
attr_accessor :platform
|
40
41
|
def initialize
|
41
42
|
@logging = true
|
42
43
|
@base_directory = Pathname(".")
|
@@ -66,6 +67,7 @@ module Grntest
|
|
66
67
|
@suppress_backtrace = true
|
67
68
|
@collect_query_log = false
|
68
69
|
@debug = false
|
70
|
+
@platform = guess_platform
|
69
71
|
end
|
70
72
|
|
71
73
|
def logging?
|
@@ -173,5 +175,18 @@ module Grntest
|
|
173
175
|
"so"
|
174
176
|
end
|
175
177
|
end
|
178
|
+
|
179
|
+
def guess_platform
|
180
|
+
case RUBY_PLATFORM
|
181
|
+
when /mingw|mswin/
|
182
|
+
"windows"
|
183
|
+
when /darwin/
|
184
|
+
"macos"
|
185
|
+
when /linux/
|
186
|
+
"linux"
|
187
|
+
else
|
188
|
+
"unknown"
|
189
|
+
end
|
190
|
+
end
|
176
191
|
end
|
177
192
|
end
|
@@ -374,6 +374,19 @@ module Grntest
|
|
374
374
|
@ignore_log_patterns.delete(pattern)
|
375
375
|
end
|
376
376
|
|
377
|
+
def execute_directive_require_platform(parser, line, content, options)
|
378
|
+
platform, = options
|
379
|
+
if platform.start_with?("!")
|
380
|
+
if @context.platform == platform[1..-1]
|
381
|
+
omit("require platform: #{platform} (#{@context.platform})")
|
382
|
+
end
|
383
|
+
else
|
384
|
+
if @context.platform != platform
|
385
|
+
omit("require platform: #{platform} (#{@context.platform})")
|
386
|
+
end
|
387
|
+
end
|
388
|
+
end
|
389
|
+
|
377
390
|
def execute_directive(parser, line, content)
|
378
391
|
command, *options = Shellwords.split(content)
|
379
392
|
case command
|
@@ -421,6 +434,8 @@ module Grntest
|
|
421
434
|
execute_directive_add_ignore_log_pattern(parser, line, content, options)
|
422
435
|
when "remove-ignore-log-pattern"
|
423
436
|
execute_directive_remove_ignore_log_pattern(parser, line, content, options)
|
437
|
+
when "require-platform"
|
438
|
+
execute_directive_require_platform(parser, line, content, options)
|
424
439
|
else
|
425
440
|
log_input(line)
|
426
441
|
log_error("#|e| unknown directive: <#{command}>")
|
@@ -535,8 +550,10 @@ module Grntest
|
|
535
550
|
end
|
536
551
|
next if thread_log_message?(entry.message)
|
537
552
|
next if ignore_log_message?(entry.message)
|
538
|
-
|
539
|
-
|
553
|
+
log_level = entry.log_level
|
554
|
+
formatted_log_level = format_log_level(log_level)
|
555
|
+
message = entry.message
|
556
|
+
important_messages << "\#|#{formatted_log_level}| #{message}"
|
540
557
|
end
|
541
558
|
important_messages.join("\n")
|
542
559
|
end
|
@@ -602,6 +619,8 @@ module Grntest
|
|
602
619
|
true
|
603
620
|
when /\A[a-zA-Z]:[\/\\]/
|
604
621
|
true
|
622
|
+
when /\A\(unknown\):\d+:\d+: /
|
623
|
+
true
|
605
624
|
when /\A(?:groonga|groonga-httpd)
|
606
625
|
\((?:\+0x\h+|\w+\+0x\h+)?\)
|
607
626
|
\s
|
data/lib/grntest/reporters.rb
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
# Copyright (C) 2012-2015 Kouhei Sutou <kou@clear-code.com>
|
1
|
+
# Copyright (C) 2012-2020 Sutou Kouhei <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
|
@@ -19,6 +17,7 @@ require "grntest/reporters/mark-reporter"
|
|
19
17
|
require "grntest/reporters/buffered-mark-reporter"
|
20
18
|
require "grntest/reporters/stream-reporter"
|
21
19
|
require "grntest/reporters/inplace-reporter"
|
20
|
+
require "grntest/reporters/progress-reporter"
|
22
21
|
|
23
22
|
module Grntest
|
24
23
|
module Reporters
|
@@ -33,6 +32,8 @@ module Grntest
|
|
33
32
|
StreamReporter.new(tester)
|
34
33
|
when :inplace
|
35
34
|
InplaceReporter.new(tester)
|
35
|
+
when :progress
|
36
|
+
ProgressReporter.new(tester)
|
36
37
|
end
|
37
38
|
end
|
38
39
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Copyright (C) 2020 Sutou Kouhei <kou@clear-code.com>
|
2
|
+
#
|
3
|
+
# This program is free software: you can redistribute it and/or modify
|
4
|
+
# it under the terms of the GNU General Public License as published by
|
5
|
+
# the Free Software Foundation, either version 3 of the License, or
|
6
|
+
# (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
+
# GNU General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU General Public License
|
14
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
15
|
+
|
16
|
+
require "grntest/reporters/inplace-reporter"
|
17
|
+
|
18
|
+
module Grntest
|
19
|
+
module Reporters
|
20
|
+
class ProgressReporter < InplaceReporter
|
21
|
+
private
|
22
|
+
def draw_statistics_header_line
|
23
|
+
puts(statistics_header)
|
24
|
+
end
|
25
|
+
|
26
|
+
def draw_status_line(worker)
|
27
|
+
end
|
28
|
+
|
29
|
+
def draw_test_line(worker)
|
30
|
+
end
|
31
|
+
|
32
|
+
def n_worker_lines
|
33
|
+
0
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/lib/grntest/test-runner.rb
CHANGED
@@ -297,6 +297,30 @@ call (int)chdir("#{context.temporary_directory_path}")
|
|
297
297
|
match-leak-kinds: reachable
|
298
298
|
...
|
299
299
|
fun:_dl_catch_error
|
300
|
+
}
|
301
|
+
{
|
302
|
+
_dl_init
|
303
|
+
Memcheck:Leak
|
304
|
+
match-leak-kinds: reachable
|
305
|
+
...
|
306
|
+
fun:_dl_init
|
307
|
+
...
|
308
|
+
}
|
309
|
+
{
|
310
|
+
_Z41__static_initialization_and_destruction_0ii
|
311
|
+
Memcheck:Leak
|
312
|
+
match-leak-kinds: reachable
|
313
|
+
...
|
314
|
+
fun:_Z41__static_initialization_and_destruction_0ii
|
315
|
+
...
|
316
|
+
}
|
317
|
+
{
|
318
|
+
je_arrow_private_je_background_thread_create
|
319
|
+
Memcheck:Leak
|
320
|
+
match-leak-kinds: possible
|
321
|
+
...
|
322
|
+
fun:je_arrow_private_je_background_thread_create
|
323
|
+
...
|
300
324
|
}
|
301
325
|
SUPPRESSIONS
|
302
326
|
end
|
@@ -787,6 +811,8 @@ http {
|
|
787
811
|
pre = $1
|
788
812
|
_path = $2
|
789
813
|
"#{pre}<PATH>"
|
814
|
+
when /\A(line \d+:\d+: syntax error), unexpected .*\z/
|
815
|
+
$1
|
790
816
|
else
|
791
817
|
content
|
792
818
|
end
|
data/lib/grntest/tester.rb
CHANGED
@@ -137,7 +137,13 @@ module Grntest
|
|
137
137
|
diff_option_is_specified = true
|
138
138
|
end
|
139
139
|
|
140
|
-
available_reporters = [
|
140
|
+
available_reporters = [
|
141
|
+
:mark,
|
142
|
+
:"buffered-mark",
|
143
|
+
:stream,
|
144
|
+
:inplace,
|
145
|
+
:progress,
|
146
|
+
]
|
141
147
|
available_reporter_labels = available_reporters.join(", ")
|
142
148
|
parser.on("--reporter=REPORTER", available_reporters,
|
143
149
|
"Report test result by REPORTER",
|
@@ -371,7 +377,7 @@ module Grntest
|
|
371
377
|
if @n_workers == 1
|
372
378
|
:mark
|
373
379
|
else
|
374
|
-
:
|
380
|
+
:progress
|
375
381
|
end
|
376
382
|
else
|
377
383
|
@reporter
|
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.4.3
|
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-05-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: diff-lcs
|
@@ -238,6 +238,7 @@ files:
|
|
238
238
|
- lib/grntest/reporters/buffered-mark-reporter.rb
|
239
239
|
- lib/grntest/reporters/inplace-reporter.rb
|
240
240
|
- lib/grntest/reporters/mark-reporter.rb
|
241
|
+
- lib/grntest/reporters/progress-reporter.rb
|
241
242
|
- lib/grntest/reporters/stream-reporter.rb
|
242
243
|
- lib/grntest/response-parser.rb
|
243
244
|
- lib/grntest/template-evaluator.rb
|