grntest 1.5.7 → 1.5.8
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 +10 -0
- data/lib/grntest/executors/base-executor.rb +1 -1
- data/lib/grntest/test-runner.rb +12 -4
- data/lib/grntest/tester.rb +22 -3
- data/lib/grntest/version.rb +2 -2
- data/lib/grntest/worker.rb +21 -23
- 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: 2209e3afe2a2ef0d25a9ad8e61e0ef36fad7b9faa7106b20d00511ad6f767a9e
|
4
|
+
data.tar.gz: dfe1b6a22dbae8d02ada396dc237e20f7384e94a52b5c37e35d8c2dbd01a90df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e84e6673963cb2bf2de0cb5cbd21a9d64977924716c37102aea48415aab1ffcbfdde2f630030f3179828c9e0855da124ca226523c0a060dd92cfd04bb6880e1
|
7
|
+
data.tar.gz: 6f2c4f6730b26200e5fa8d39cb56d550dbe98407e5eb54f824e99f0dac9a84616da12fb1f4a32e799344d443d91fd297128e979a8c1caafa96d85a15fb7444ce
|
data/doc/text/news.md
CHANGED
data/lib/grntest/test-runner.rb
CHANGED
@@ -500,10 +500,13 @@ call (int)chdir("#{context.temporary_directory_path}")
|
|
500
500
|
"-s",
|
501
501
|
context.relative_db_path.to_s,
|
502
502
|
]
|
503
|
-
when "groonga-httpd"
|
504
|
-
command_line = command_command_line(@tester.groonga_httpd,
|
503
|
+
when "groonga-httpd", "groonga-nginx"
|
504
|
+
command_line = command_command_line(@tester.groonga_httpd,
|
505
|
+
context,
|
505
506
|
spawn_options)
|
506
|
-
config_file_path = create_config_file(context,
|
507
|
+
config_file_path = create_config_file(context,
|
508
|
+
host,
|
509
|
+
port,
|
507
510
|
pid_file_path)
|
508
511
|
command_line += [
|
509
512
|
"-c", config_file_path.to_s,
|
@@ -517,6 +520,11 @@ call (int)chdir("#{context.temporary_directory_path}")
|
|
517
520
|
config_file_path =
|
518
521
|
context.temporary_directory_path + "groonga-httpd.conf"
|
519
522
|
config_file_path.open("w") do |config_file|
|
523
|
+
if @tester.ngx_http_groonga_module_so
|
524
|
+
config_file.puts(<<-LOAD_MODULE)
|
525
|
+
load_module #{@tester.ngx_http_groonga_module_so};
|
526
|
+
LOAD_MODULE
|
527
|
+
end
|
520
528
|
config_file.puts(<<-GLOBAL)
|
521
529
|
daemon off;
|
522
530
|
master_process off;
|
@@ -725,7 +733,7 @@ http {
|
|
725
733
|
|
726
734
|
def normalize_output_xml(content, options)
|
727
735
|
content.sub(/^<RESULT .+?>/) do |result|
|
728
|
-
result.gsub(/( (?:UP|ELAPSED))="
|
736
|
+
result.gsub(/( (?:UP|ELAPSED))="-?\d+\.\d+(?:e[+-]?\d+)?"/, '\1="0.0"')
|
729
737
|
end
|
730
738
|
end
|
731
739
|
|
data/lib/grntest/tester.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2012-
|
1
|
+
# Copyright (C) 2012-2023 Sutou Kouhei <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
|
@@ -38,6 +38,7 @@ module Grntest
|
|
38
38
|
parser = OptionParser.new
|
39
39
|
parser.banner += " TEST_FILE_OR_DIRECTORY..."
|
40
40
|
|
41
|
+
custom_groonga_httpd = false
|
41
42
|
parser.on("--groonga=COMMAND",
|
42
43
|
"Use COMMAND as groonga command",
|
43
44
|
"(#{tester.groonga})") do |command|
|
@@ -48,6 +49,13 @@ module Grntest
|
|
48
49
|
"Use COMMAND as groonga-httpd command for groonga-httpd tests",
|
49
50
|
"(#{tester.groonga_httpd})") do |command|
|
50
51
|
tester.groonga_httpd = normalize_command(command)
|
52
|
+
custom_groonga_httpd = true
|
53
|
+
end
|
54
|
+
|
55
|
+
parser.on("--ngx-http-groonga-module-so=PATH",
|
56
|
+
"Use PATH as ngx_http_groonga_module.so for groonga-nginx tests",
|
57
|
+
"(#{tester.ngx_http_groonga_module_so})") do |path|
|
58
|
+
tester.ngx_http_groonga_module_so = path
|
51
59
|
end
|
52
60
|
|
53
61
|
parser.on("--groonga-suggest-create-dataset=COMMAND",
|
@@ -101,15 +109,19 @@ module Grntest
|
|
101
109
|
tester.output_type = type
|
102
110
|
end
|
103
111
|
|
104
|
-
available_testees = ["groonga", "groonga-httpd"]
|
112
|
+
available_testees = ["groonga", "groonga-httpd", "groonga-nginx"]
|
105
113
|
available_testee_labels = available_testees.join(", ")
|
106
114
|
parser.on("--testee=TESTEE", available_testees,
|
107
115
|
"Test against TESTEE",
|
108
116
|
"[#{available_testee_labels}]",
|
109
117
|
"(#{tester.testee})") do |testee|
|
110
118
|
tester.testee = testee
|
111
|
-
|
119
|
+
case tester.testee
|
120
|
+
when "groonga-httpd"
|
121
|
+
tester.interface = "http"
|
122
|
+
when "groonga-nginx"
|
112
123
|
tester.interface = "http"
|
124
|
+
tester.groonga_httpd = "nginx" unless custom_groonga_httpd
|
113
125
|
end
|
114
126
|
end
|
115
127
|
|
@@ -281,6 +293,11 @@ module Grntest
|
|
281
293
|
tester.shutdown_wait_timeout = timeout
|
282
294
|
end
|
283
295
|
|
296
|
+
parser.on("--random-seed=SEED", Integer,
|
297
|
+
"Seed for random numbers") do |seed|
|
298
|
+
srand(seed)
|
299
|
+
end
|
300
|
+
|
284
301
|
parser.on("--version",
|
285
302
|
"Show version and exit") do
|
286
303
|
puts(VERSION)
|
@@ -317,6 +334,7 @@ module Grntest
|
|
317
334
|
|
318
335
|
attr_accessor :groonga
|
319
336
|
attr_accessor :groonga_httpd
|
337
|
+
attr_accessor :ngx_http_groonga_module_so
|
320
338
|
attr_accessor :groonga_suggest_create_dataset
|
321
339
|
attr_accessor :groonga_synonym_generate
|
322
340
|
attr_accessor :interface
|
@@ -346,6 +364,7 @@ module Grntest
|
|
346
364
|
def initialize
|
347
365
|
@groonga = "groonga"
|
348
366
|
@groonga_httpd = "groonga-httpd"
|
367
|
+
@ngx_http_groonga_module_so = nil
|
349
368
|
@groonga_suggest_create_dataset = "groonga-suggest-create-dataset"
|
350
369
|
unless command_exist?(@groonga_suggest_create_dataset)
|
351
370
|
@groonga_suggest_create_dataset = nil
|
data/lib/grntest/version.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2012-
|
1
|
+
# Copyright (C) 2012-2023 Sutou Kouhei <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.5.
|
17
|
+
VERSION = "1.5.8"
|
18
18
|
end
|
data/lib/grntest/worker.rb
CHANGED
@@ -93,31 +93,29 @@ module Grntest
|
|
93
93
|
|
94
94
|
@result.measure do
|
95
95
|
@reporter.on_worker_start(self)
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
break
|
115
|
-
end
|
96
|
+
loop do
|
97
|
+
suite_name, test_script_path, test_name = queue.pop
|
98
|
+
break if test_script_path.nil?
|
99
|
+
|
100
|
+
unless @suite_name == suite_name
|
101
|
+
@reporter.on_suite_finish(self) if @suite_name
|
102
|
+
@suite_name = suite_name
|
103
|
+
@reporter.on_suite_start(self)
|
104
|
+
end
|
105
|
+
|
106
|
+
unless run_test(test_script_path, test_name)
|
107
|
+
succeeded = false
|
108
|
+
end
|
109
|
+
|
110
|
+
break if interruptted?
|
111
|
+
|
112
|
+
if @tester.stop_on_failure? and @test_suites_result.have_failure?
|
113
|
+
break
|
116
114
|
end
|
117
|
-
@status = "finished"
|
118
|
-
@reporter.on_suite_finish(@suite_name) if @suite_name
|
119
|
-
@suite_name = nil
|
120
115
|
end
|
116
|
+
@status = "finished"
|
117
|
+
@reporter.on_suite_finish(@suite_name) if @suite_name
|
118
|
+
@suite_name = nil
|
121
119
|
end
|
122
120
|
@reporter.on_worker_finish(self)
|
123
121
|
|
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.5.
|
4
|
+
version: 1.5.8
|
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: 2023-
|
12
|
+
date: 2023-07-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: diff-lcs
|