grntest 1.0.5 → 1.0.6

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
  SHA1:
3
- metadata.gz: 942d6904ffdb299bc06a436416abbd5161be865c
4
- data.tar.gz: 4fe3d75f0d6cd99c5c3aac7586ef812ca6f1d6d1
3
+ metadata.gz: bd1dbfd1fb004cc82763f563295077345a51f146
4
+ data.tar.gz: 37937cc7289f27f9aa2c5473a35f5b7b93587771
5
5
  SHA512:
6
- metadata.gz: 2d15beda7b6fe693091a2b3d90d1f6ce3277846044d8f5376795e4d160ed79989c3ae6e5361d7ed3e950bbbb11297cbbf27ecacbb960ce471c3e06713475b1ba
7
- data.tar.gz: bc6903386c278bbeed019106da7b833fa4a8aff775f57fbf31b12799515f101c9da026fddb00d0a4f6ee5bf47d54c7a45788df8decdff93aa4c069c1e1da4e4d
6
+ metadata.gz: 3b891df58ceb4ff9982bdec75d63bd19317fd5135a1432c687e40d38410731c394394f54777d4458aaa22565f7b32e4684fdaa4354e1009d1c789e9b2854a1d0
7
+ data.tar.gz: 2ccea2683b2487db0dd832e0f1678d1a726fc432b21aa56905c96fcffef8bd3e9ab41fea6efdf2fce3d88300b051196c4aac971941dcd754c4228954ae908aa5
data/README.md CHANGED
@@ -6,8 +6,8 @@ grntest
6
6
 
7
7
  ## Description
8
8
 
9
- Grntest is a testing framework for groonga. You can write a test for
10
- groonga by writing groonga commands and expected result.
9
+ Grntest is a testing framework for Groonga. You can write a test for
10
+ Groonga by writing Groonga commands and expected result.
11
11
 
12
12
  ## Install
13
13
 
@@ -548,7 +548,7 @@ database.
548
548
 
549
549
  ## Examples
550
550
 
551
- See [test/command/ directory in groonga's
551
+ See [test/command/ directory in Groonga's
552
552
  source](https://github.com/groonga/groonga/tree/master/test/command). It
553
553
  has many test scripts and uses many useful features. They will help you.
554
554
 
data/doc/text/news.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # News
2
2
 
3
+ ## 1.0.6: 2014-08-16
4
+
5
+ ### Improvements
6
+
7
+ * Supported normalizing path in error message.
8
+ * Improved backtrace log detection.
9
+ [groonga-dev,02650] [Reported by Naoya Murakami]
10
+
11
+ ### Thanks
12
+
13
+ * Naoya Murakami
14
+
3
15
  ## 1.0.5: 2014-02-13
4
16
 
5
17
  ### Improvements
data/grntest.gemspec CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
33
33
  entries = readme.split(/^\#\#\s(.*)$/)
34
34
  description = clean_white_space.call(entries[entries.index("Description") + 1])
35
35
  spec.summary, spec.description, = description.split(/\n\n+/, 3)
36
- spec.license = "GPLv3 or later"
36
+ spec.license = "GPL-3.0+"
37
37
  spec.files = ["README.md", "Rakefile", "Gemfile", "#{spec.name}.gemspec"]
38
38
  spec.files += [".yardopts"]
39
39
  spec.files += Dir.glob("lib/**/*.rb")
@@ -302,7 +302,14 @@ module Grntest
302
302
  end
303
303
 
304
304
  def backtrace_log_message?(message)
305
- message.start_with?("/")
305
+ case message
306
+ when /\A\//
307
+ true
308
+ when /\Agroonga\(\) \[0x[\da-f]+\]\z/
309
+ true
310
+ else
311
+ false
312
+ end
306
313
  end
307
314
 
308
315
  def error_response?(response, type)
@@ -411,7 +411,7 @@ EOF
411
411
  when :output
412
412
  normalized_result << normalize_output(content, options)
413
413
  when :error
414
- normalized_result << normalize_raw_content(content)
414
+ normalized_result << normalize_error(content)
415
415
  when :n_leaked_objects
416
416
  result.n_leaked_objects = content
417
417
  end
@@ -435,7 +435,8 @@ EOF
435
435
  return $!.message
436
436
  end
437
437
  normalized_status = normalize_status(status)
438
- normalized_output_content = [normalized_status, *values]
438
+ normalized_values = normalize_values(values)
439
+ normalized_output_content = [normalized_status, *normalized_values]
439
440
  normalized_output = JSON.generate(normalized_output_content)
440
441
  if normalized_output.bytesize > @max_n_columns
441
442
  normalized_output = JSON.pretty_generate(normalized_output_content)
@@ -463,10 +464,43 @@ EOF
463
464
  else
464
465
  message, backtrace = rest
465
466
  _ = backtrace # for suppress warnings
467
+ message = normalize_path_in_error_message(message)
466
468
  [[return_code, 0.0, 0.0], message]
467
469
  end
468
470
  end
469
471
 
472
+ def normalize_values(values)
473
+ values.collect do |value|
474
+ if value.is_a?(Hash) and value["exception"]
475
+ exception = Marshal.load(Marshal.dump(value["exception"]))
476
+ message = exception["message"]
477
+ exception["message"] = normalize_path_in_error_message(message)
478
+ value.merge("exception" => exception)
479
+ else
480
+ value
481
+ end
482
+ end
483
+ end
484
+
485
+ def normalize_error(content)
486
+ content = normalize_path_in_error_message(content)
487
+ normalize_raw_content(content)
488
+ end
489
+
490
+ def normalize_path_in_error_message(content)
491
+ case content
492
+ when /\A(.*'fopen: failed to open mruby script file: )<(.+?)>'(.*)\z/
493
+ pre = $1
494
+ path = $2
495
+ post = $3
496
+ normalized_path = File.basename(path)
497
+ post = "" unless post.end_with?(")")
498
+ "#{pre}<#{normalized_path}>'#{post}"
499
+ else
500
+ content
501
+ end
502
+ end
503
+
470
504
  def test_script_path
471
505
  @worker.test_script_path
472
506
  end
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2012-2013 Kouhei Sutou <kou@clear-code.com>
1
+ # Copyright (C) 2012-2014 Kouhei Sutou <kou@clear-code.com>
2
2
  #
3
3
  # This program is free software: you can redistribute it and/or modify
4
4
  # it under the terms of the GNU General Public License as published by
@@ -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.0.5"
17
+ VERSION = "1.0.6"
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.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
@@ -9,132 +9,132 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-13 00:00:00.000000000 Z
12
+ date: 2014-08-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '>='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: msgpack
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: groonga-command-parser
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - '>='
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '>='
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: bundler
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - '>='
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - '>='
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rake
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - '>='
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - '>='
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: test-unit
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - '>='
88
+ - - ">="
89
89
  - !ruby/object:Gem::Version
90
90
  version: '0'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - '>='
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: test-unit-rr
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - '>='
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - '>='
109
+ - - ">="
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0'
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: packnga
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - '>='
116
+ - - ">="
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0'
119
119
  type: :development
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - '>='
123
+ - - ">="
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: redcarpet
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - '>='
130
+ - - ">="
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0'
133
133
  type: :development
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - '>='
137
+ - - ">="
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  description: ''
@@ -146,38 +146,38 @@ executables:
146
146
  extensions: []
147
147
  extra_rdoc_files: []
148
148
  files:
149
+ - ".yardopts"
150
+ - Gemfile
149
151
  - README.md
150
152
  - Rakefile
151
- - Gemfile
153
+ - bin/grntest
154
+ - doc/text/gpl-3.0.txt
155
+ - doc/text/news.md
152
156
  - grntest.gemspec
153
- - .yardopts
154
- - lib/grntest/reporters.rb
155
- - lib/grntest/test-runner.rb
157
+ - lib/grntest/base-result.rb
158
+ - lib/grntest/error.rb
156
159
  - lib/grntest/execution-context.rb
157
- - lib/grntest/executors/standard-io-executor.rb
160
+ - lib/grntest/executors.rb
158
161
  - lib/grntest/executors/base-executor.rb
159
162
  - lib/grntest/executors/http-executor.rb
160
- - lib/grntest/worker.rb
161
- - lib/grntest/tester.rb
162
- - lib/grntest/version.rb
163
- - lib/grntest/error.rb
163
+ - lib/grntest/executors/standard-io-executor.rb
164
+ - lib/grntest/reporters.rb
165
+ - lib/grntest/reporters/base-reporter.rb
164
166
  - lib/grntest/reporters/inplace-reporter.rb
165
167
  - lib/grntest/reporters/mark-reporter.rb
166
168
  - lib/grntest/reporters/stream-reporter.rb
167
- - lib/grntest/reporters/base-reporter.rb
168
- - lib/grntest/base-result.rb
169
- - lib/grntest/test-suites-runner.rb
170
- - lib/grntest/executors.rb
171
169
  - lib/grntest/response-parser.rb
172
- - doc/text/news.md
173
- - doc/text/gpl-3.0.txt
174
- - test/executors/test-standard-io-executor.rb
170
+ - lib/grntest/test-runner.rb
171
+ - lib/grntest/test-suites-runner.rb
172
+ - lib/grntest/tester.rb
173
+ - lib/grntest/version.rb
174
+ - lib/grntest/worker.rb
175
175
  - test/executors/test-base-executor.rb
176
+ - test/executors/test-standard-io-executor.rb
176
177
  - test/run-test.rb
177
- - bin/grntest
178
178
  homepage: https://github.com/groonga/grntest
179
179
  licenses:
180
- - GPLv3 or later
180
+ - GPL-3.0+
181
181
  metadata: {}
182
182
  post_install_message:
183
183
  rdoc_options: []
@@ -185,23 +185,23 @@ require_paths:
185
185
  - lib
186
186
  required_ruby_version: !ruby/object:Gem::Requirement
187
187
  requirements:
188
- - - '>='
188
+ - - ">="
189
189
  - !ruby/object:Gem::Version
190
190
  version: '0'
191
191
  required_rubygems_version: !ruby/object:Gem::Requirement
192
192
  requirements:
193
- - - '>='
193
+ - - ">="
194
194
  - !ruby/object:Gem::Version
195
195
  version: '0'
196
196
  requirements: []
197
197
  rubyforge_project:
198
- rubygems_version: 2.0.13
198
+ rubygems_version: 2.2.2
199
199
  signing_key:
200
200
  specification_version: 4
201
- summary: Grntest is a testing framework for groonga. You can write a test for groonga
202
- by writing groonga commands and expected result.
201
+ summary: Grntest is a testing framework for Groonga. You can write a test for Groonga
202
+ by writing Groonga commands and expected result.
203
203
  test_files:
204
- - test/executors/test-standard-io-executor.rb
205
204
  - test/executors/test-base-executor.rb
205
+ - test/executors/test-standard-io-executor.rb
206
206
  - test/run-test.rb
207
207
  has_rdoc: