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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29784781308745fb8cbb626e33012d1dfb25dfdbe7196c53079b57327478a4d2
4
- data.tar.gz: 970b7ea3558d9ad1febbdfa4b375f849b0dd10bb81c65b6651b6e210a91e6431
3
+ metadata.gz: 2c99cf81f130a001622b83bad35c60325f888508aad9c2ca3e48d1ec81eea253
4
+ data.tar.gz: 8fdd429aef32866b83711a8523dac6a453941d2eaa9a6829733ffa6e53163bae
5
5
  SHA512:
6
- metadata.gz: 9752d6bcb935119c458d2911a7643620a6b3c5b4b9a2a8af772a5d8942e3a94fef6a51370772a317bbeaa47b202e35b3e47a5ed66e6b33c0e9870249e4ac3d8d
7
- data.tar.gz: 35d70626990bead81c6eccb5a15b21c4a00279484635f131d231e0d5f2242cf48ac220a4d72e9d61addce35d0e07c20073a2a0e3f6df08cdc48adfce351863f2
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
@@ -767,7 +767,7 @@ module Grntest
767
767
  true
768
768
  when /\A[\w.\\-]+:\d+:\d+: /
769
769
  true
770
- when /\A(?:groonga|groonga-httpd)
770
+ when /\A(?:groonga|groonga-httpd|nginx)
771
771
  \((?:\+0x\h+|\w+\+0x\h+)?\)
772
772
  \s
773
773
  \[0x\h+\]\z/x
@@ -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, context,
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, host, port,
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))="\d+\.\d+(?:e[+-]?\d+)?"/, '\1="0.0"')
737
+ result.gsub(/( (?:UP|ELAPSED))="-?\d+\.\d+(?:e[+-]?\d+)?"/, '\1="0.0"')
729
738
  end
730
739
  end
731
740
 
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2012-2022 Sutou Kouhei <kou@clear-code.com>
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
- if tester.testee == "groonga-httpd"
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
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2012-2022 Sutou Kouhei <kou@clear-code.com>
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.7"
17
+ VERSION = "1.5.9"
18
18
  end
@@ -93,31 +93,29 @@ module Grntest
93
93
 
94
94
  @result.measure do
95
95
  @reporter.on_worker_start(self)
96
- catch do |tag|
97
- loop do
98
- suite_name, test_script_path, test_name = queue.pop
99
- break if test_script_path.nil?
100
-
101
- unless @suite_name == suite_name
102
- @reporter.on_suite_finish(self) if @suite_name
103
- @suite_name = suite_name
104
- @reporter.on_suite_start(self)
105
- end
106
-
107
- unless run_test(test_script_path, test_name)
108
- succeeded = false
109
- end
110
-
111
- break if interruptted?
112
-
113
- if @tester.stop_on_failure? and @test_suites_result.have_failure?
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.7
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-03-08 00:00:00.000000000 Z
12
+ date: 2023-07-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: diff-lcs