grntest 1.3.9 → 1.4.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2822b1c9433f75a24a3a014a15121ad65cca7b95b6a8fa118113e9d48c00310a
4
- data.tar.gz: 44acc076cbda2a13467a42fdf0d20563e02a4e78be9d49df75568db49755e31a
3
+ metadata.gz: 9733d4f25a25296b60589e7c0328872954955799278fa0194a82c279c92c5f84
4
+ data.tar.gz: 653013c00c4f38eb2c9d41edf5963fd4ccafe6a491672e5afd6d4b4b7b8dad15
5
5
  SHA512:
6
- metadata.gz: c0a8e5d24f2f0abab6341adb1d720a5388d3fdcc7e1dca087a2e9ba9a06e38949725a59a93b000e6764fb39f0b697eb91441c886924d98a7710728eb91bff592
7
- data.tar.gz: fa91b9cb29195f678b11ad27102915a3f1b4bb576fa5a52bcceee12ea25f6ebbf800c0b355d97b6bd98a28cf0942040fd07662f9e8e4719c0d2c8bccf50220d0
6
+ metadata.gz: f395c3c2eb4949842e4eefcf933ca13a71662d3b7f192e33441a91c8b69bc7a9edad21602743cb069f7247c4675ec0fc3baa738a70211bbe8963fb594f853d95
7
+ data.tar.gz: 6075f8e1009aff8baf34824cb125468b45809ea8465077e27d7d80b10864a5ebe8790abda81336a2da220840583c97f53e417e9f7139da718bd2706140860ded
@@ -1,5 +1,40 @@
1
1
  # News
2
2
 
3
+ ## 1.4.4: 2020-07-18
4
+
5
+ ### Improvements
6
+
7
+ * Added support for detecting backtrace log for MinGW build.
8
+
9
+ ## 1.4.3: 2020-05-31
10
+
11
+ ### Improvements
12
+
13
+ * Removed log normalization.
14
+
15
+ ## 1.4.2: 2020-05-30
16
+
17
+ ### Improvements
18
+
19
+ * Removed log level normalization.
20
+
21
+ * Added `require-platform` directive.
22
+
23
+ * Added support for normalizing IO open/close log message with
24
+ additional message.
25
+
26
+ ## 1.4.1: 2020-05-30
27
+
28
+ ### Improvements
29
+
30
+ * Added support for normalizing IO open/close log message.
31
+
32
+ ## 1.4.0: 2020-05-16
33
+
34
+ ### Improvements
35
+
36
+ * Added support for normalizing mruby's syntax error message.
37
+
3
38
  ## 1.3.9: 2020-05-09
4
39
 
5
40
  ### 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
- formatted_log_level = format_log_level(entry.log_level)
539
- important_messages << "\#|#{formatted_log_level}| #{entry.message}"
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
@@ -604,6 +621,8 @@ module Grntest
604
621
  true
605
622
  when /\A\(unknown\):\d+:\d+: /
606
623
  true
624
+ when /\A[\w.\\-]+:\d+:\d+: /
625
+ true
607
626
  when /\A(?:groonga|groonga-httpd)
608
627
  \((?:\+0x\h+|\w+\+0x\h+)?\)
609
628
  \s
@@ -811,6 +811,8 @@ http {
811
811
  pre = $1
812
812
  _path = $2
813
813
  "#{pre}<PATH>"
814
+ when /\A(line \d+:\d+: syntax error), unexpected .*\z/
815
+ $1
814
816
  else
815
817
  content
816
818
  end
@@ -14,5 +14,5 @@
14
14
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
15
 
16
16
  module Grntest
17
- VERSION = "1.3.9"
17
+ VERSION = "1.4.4"
18
18
  end
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.9
4
+ version: 1.4.4
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-05-09 00:00:00.000000000 Z
12
+ date: 2020-07-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: diff-lcs