grntest 1.5.7 → 1.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.md +16 -0
- data/lib/grntest/executors/base-executor.rb +1 -1
- data/lib/grntest/test-runner.rb +13 -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: 2c99cf81f130a001622b83bad35c60325f888508aad9c2ca3e48d1ec81eea253
|
4
|
+
data.tar.gz: 8fdd429aef32866b83711a8523dac6a453941d2eaa9a6829733ffa6e53163bae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d59793e2fcc4fc0497d583b382165c4dae0cd285e73e8a846c73b3cddcc1f398b12d516c649cf0f2d0463266c81750ef473bd621708de6dbbf4673312a418c5f
|
7
|
+
data.tar.gz: fa949a43524548a6b77a0226f1df3a400b246c7c3b2559b8343d3c300ec114d984e22ac24f68e803a3edba565d2ffe2aed5fa132453fa32113432a151465737f
|
data/doc/text/news.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# News
|
2
2
|
|
3
|
+
## 1.5.9: 2023-07-21
|
4
|
+
|
5
|
+
### Improvements
|
6
|
+
|
7
|
+
* groonga-nginx: Created `logs/` directory.
|
8
|
+
|
9
|
+
## 1.5.8: 2023-07-21
|
10
|
+
|
11
|
+
### Improvements
|
12
|
+
|
13
|
+
* `--random-seed`: Added.
|
14
|
+
|
15
|
+
* xml: Accepted negative elapsed time.
|
16
|
+
|
17
|
+
* Added support for groonga-nginx.
|
18
|
+
|
3
19
|
## 1.5.7: 2023-03-08
|
4
20
|
|
5
21
|
### Improvements
|
data/lib/grntest/test-runner.rb
CHANGED
@@ -500,11 +500,15 @@ 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)
|
511
|
+
FileUtils.mkdir_p(context.temporary_directory_path + "logs")
|
508
512
|
command_line += [
|
509
513
|
"-c", config_file_path.to_s,
|
510
514
|
"-p", "#{context.temporary_directory_path}/",
|
@@ -517,6 +521,11 @@ call (int)chdir("#{context.temporary_directory_path}")
|
|
517
521
|
config_file_path =
|
518
522
|
context.temporary_directory_path + "groonga-httpd.conf"
|
519
523
|
config_file_path.open("w") do |config_file|
|
524
|
+
if @tester.ngx_http_groonga_module_so
|
525
|
+
config_file.puts(<<-LOAD_MODULE)
|
526
|
+
load_module #{@tester.ngx_http_groonga_module_so};
|
527
|
+
LOAD_MODULE
|
528
|
+
end
|
520
529
|
config_file.puts(<<-GLOBAL)
|
521
530
|
daemon off;
|
522
531
|
master_process off;
|
@@ -725,7 +734,7 @@ http {
|
|
725
734
|
|
726
735
|
def normalize_output_xml(content, options)
|
727
736
|
content.sub(/^<RESULT .+?>/) do |result|
|
728
|
-
result.gsub(/( (?:UP|ELAPSED))="
|
737
|
+
result.gsub(/( (?:UP|ELAPSED))="-?\d+\.\d+(?:e[+-]?\d+)?"/, '\1="0.0"')
|
729
738
|
end
|
730
739
|
end
|
731
740
|
|
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.9"
|
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.9
|
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
|