grntest 1.5.9 → 1.6.1

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: 2c99cf81f130a001622b83bad35c60325f888508aad9c2ca3e48d1ec81eea253
4
- data.tar.gz: 8fdd429aef32866b83711a8523dac6a453941d2eaa9a6829733ffa6e53163bae
3
+ metadata.gz: ca196b4236185746df0d683e0b9632c4fd1dbaeffa5ed63c4331f73784ccd010
4
+ data.tar.gz: 3fe5db66385b146d1ea2fa1470141b8e0c884fc9481ac469d4111464e1d340d5
5
5
  SHA512:
6
- metadata.gz: d59793e2fcc4fc0497d583b382165c4dae0cd285e73e8a846c73b3cddcc1f398b12d516c649cf0f2d0463266c81750ef473bd621708de6dbbf4673312a418c5f
7
- data.tar.gz: fa949a43524548a6b77a0226f1df3a400b246c7c3b2559b8343d3c300ec114d984e22ac24f68e803a3edba565d2ffe2aed5fa132453fa32113432a151465737f
6
+ metadata.gz: 207e53bfebdb3366977a9f56546b8d7e83568ce4e459e09c877d377f3b874e219bf0c987db42fb113d0f03ea2501d91376cce1fa0566d157ca1bdbd42570724b
7
+ data.tar.gz: e46deb249c95770f16782918482c391a475e926936a12670c98fb86e7b5941c7b7596fda39b427ae69541e56dd0b4eef0a178482b28a2f3148687282a58f951f
data/doc/text/news.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # News
2
2
 
3
+ ## 1.6.1: 2023-08-11
4
+
5
+ ### Improvements
6
+
7
+ * `--n-workers`: Use the max number of cores by default.
8
+
9
+ ## 1.6.0: 2023-07-21
10
+
11
+ ### Improvements
12
+
13
+ * groonga-nginx: Set `client_body_temp_path`.
14
+
3
15
  ## 1.5.9: 2023-07-21
4
16
 
5
17
  ### Improvements
@@ -562,6 +562,7 @@ http {
562
562
  groonga_query_log_path #{context.query_log_path};
563
563
  groonga on;
564
564
  client_max_body_size 500m;
565
+ client_body_temp_path #{context.temporary_directory_path + "body"};
565
566
  }
566
567
  client_header_buffer_size 64k;
567
568
  large_client_header_buffers 4 64k;
@@ -199,7 +199,8 @@ module Grntest
199
199
  end
200
200
 
201
201
  parser.on("--n-workers=N", Integer,
202
- "Use N workers to run tests") do |n|
202
+ "Use N workers to run tests",
203
+ "(#{tester.n_workers})") do |n|
203
204
  tester.n_workers = n
204
205
  end
205
206
 
@@ -382,7 +383,7 @@ module Grntest
382
383
  @base_directory = Pathname(".")
383
384
  @database_path = nil
384
385
  @reporter = nil
385
- @n_workers = 1
386
+ @n_workers = guess_n_cores
386
387
  @output = $stdout
387
388
  @keep_database = false
388
389
  @use_color = nil
@@ -544,6 +545,28 @@ module Grntest
544
545
  runner.run(test_suites)
545
546
  end
546
547
 
548
+ def guess_n_cores
549
+ begin
550
+ if command_exist?("nproc")
551
+ # Linux
552
+ Integer(`nproc`.strip, 10)
553
+ elsif command_exist?("sysctl")
554
+ # macOS
555
+ Integer(`sysctl -n hw.logicalcpu`.strip, 10)
556
+ else
557
+ # Windows
558
+ value = ENV["NUMBER_OF_PROCESSORS"]
559
+ if value
560
+ Integer(value, 10)
561
+ else
562
+ 1
563
+ end
564
+ end
565
+ rescue ArgumentError
566
+ 1
567
+ end
568
+ end
569
+
547
570
  def detect_suitable_diff
548
571
  if command_exist?("cut-diff")
549
572
  @diff = "cut-diff"
@@ -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.9"
17
+ VERSION = "1.6.1"
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.5.9
4
+ version: 1.6.1
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-07-21 00:00:00.000000000 Z
12
+ date: 2023-08-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: diff-lcs