test-queue 0.2.1 → 0.2.2

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OGNkYjM1ODExYmMzZjM5OTNkNzA5MTcwY2M3MjQ0MzUxY2IxN2U2MQ==
4
+ MDYzZmIxZmJhODc1MDliMDZjMDZjZGM0MGRjOWM5NDljMTBmZGQ4YQ==
5
5
  data.tar.gz: !binary |-
6
- MjQ2MzIzNjlhZTI5MTc3ZTI5YjBiNWRkYjU5YzM1YTJiY2VkOTc3Mw==
6
+ MjVjZTRiY2NmOTk5MjMyNGI3ZmU5YzdiZTYyMzBkNDkyZjQwZDA0Mw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OGVkZTM5Nzk3YjMwYWJmODk0ODZmYjdkMTY1ZWQxZjQ0Yzg3MGU2ZTE1YjQy
10
- NTFiNzEyYjlhYmI3MDcxZmZhYzU1NGFjNzEyZmQ5YmE2ODQ5ZDU2ZGUwZjA4
11
- OGVhMGM0MWU4MTRkMjJiMWUwNzgzZDM2Mjg2NWI0ZjA3ODgzOTQ=
9
+ YjMxMTMzMGQ1YTBlZmVlNjI4ODc0N2JkNGYwZTAxODExNWNiNDQ2NGIwZmEy
10
+ NDRiY2Y0ZGYzMzk4YzE1NmNhZTEzOWNjYzQ5N2M1MzJlYTg5ZWMzOTlkNzMx
11
+ MjIyM2FhMzEyYzBkMjViMmFjZGIzNTkwMGYxMmViNWE4NDlhMmI=
12
12
  data.tar.gz: !binary |-
13
- NGVmYTQ0OTY3NGJkOTQxYTBkNmFkZWY4MDQ0MTc4NzA0ZTMxN2ViZmM2NDYy
14
- MzEyODlkZTRhYzEwNWJmMWUzYWVhOTI2NTNiMzJiY2UyZDAyZGI2ODUxNmUw
15
- NDQwODcyZmE0MjhlYTljZmMyNTc1MmRiNzdjMzU2MWY0ODEwMjg=
13
+ MTFkNDBmODQ3NDZkM2IzMDI4OTFjZGY1ZGU3ZTFkZjhlYzUyMWMwMzgzZGYy
14
+ ODkxNjYyMGEwYWE3MGNiY2UxMWUwODZhOWU4MjhlZGNmZWU1NWE4YjM2NWU5
15
+ NTFiYzZlZWJhODkzMzNmMWFhYzFmMDQxMjU4ODUwODJkZTg5ZGE=
data/README.md CHANGED
@@ -31,6 +31,7 @@ the workload and relay results back to a central master.
31
31
  - `TEST_QUEUE_SOCKET`: unix socket `path` (or tcp `address:port` pair) used for communication (default: `/tmp/test_queue_XXXXX.sock`)
32
32
  - `TEST_QUEUE_RELAY`: relay results back to a central master, specified as tcp `address:port`
33
33
  - `TEST_QUEUE_STATS`: `path` to cache build stats in-build CI runs (default: `.test_queue_stats`)
34
+ - `TEST_QUEUE_FORCE`: comma separated list of suites to run
34
35
 
35
36
  ### usage
36
37
 
@@ -25,6 +25,11 @@ module TestQueue
25
25
  def initialize(queue, concurrency=nil, socket=nil, relay=nil)
26
26
  raise ArgumentError, 'array required' unless Array === queue
27
27
 
28
+ if forced = ENV['TEST_QUEUE_FORCE']
29
+ whitelist = Set.new(forced.split(/\s*,\s*/))
30
+ queue = queue.select{ |s| whitelist.include?(s.to_s) }
31
+ end
32
+
28
33
  @procline = $0
29
34
  @queue = queue
30
35
  @suites = queue.inject(Hash.new){ |hash, suite| hash.update suite.to_s => suite }
@@ -268,7 +273,7 @@ module TestQueue
268
273
 
269
274
  def worker_completed(worker)
270
275
  @completed << worker
271
- puts worker.output if ENV['TEST_QUEUE_VERBOSE']
276
+ puts worker.output if ENV['TEST_QUEUE_VERBOSE'] || worker.status.exitstatus != 0
272
277
  end
273
278
 
274
279
  def distribute_queue
@@ -59,9 +59,9 @@ module TestQueue
59
59
  stats[s.to_s] = val
60
60
  end
61
61
 
62
- num_tests = worker.lines.grep(/ errors?, /).first
62
+ num_tests = worker.lines.grep(/, \d+ errors?, /).first
63
63
  failures = worker.lines.select{ |line|
64
- line if (line =~ /^Finished/) ... (line =~ / errors?, /)
64
+ line if (line =~ /^Finished/) ... (line =~ /, \d+ errors?, /)
65
65
  }[1..-2]
66
66
  failures = failures.join("\n") if failures
67
67
 
@@ -42,7 +42,7 @@ module TestQueue
42
42
  class RSpec < Runner
43
43
  def initialize
44
44
  @rspec = ::RSpec::Core::QueueRunner.new
45
- super(@rspec.example_groups.sort_by{ |s| -(stats[s.description] || 0) })
45
+ super(@rspec.example_groups.sort_by{ |s| -(stats[s.to_s] || 0) })
46
46
  end
47
47
 
48
48
  def run_worker(iterator)
data/test-queue.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'test-queue'
3
- s.version = '0.2.1'
3
+ s.version = '0.2.2'
4
4
  s.summary = 'parallel test runner'
5
5
  s.description = 'minitest/rspec parallel test runner for CI environments'
6
6
 
data/test.sh CHANGED
@@ -7,3 +7,5 @@ bundle exec minitest-queue ./test/*_minispec.rb
7
7
  bundle exec minitest-queue ./test/*_test.rb
8
8
  bundle exec rspec-queue test
9
9
  bundle exec cucumber-queue
10
+
11
+ TEST_QUEUE_WORKERS=1 TEST_QUEUE_FORCE="MiniTestSleep21,MiniTestSleep8,MiniTestFailure" bundle exec minitest-queue ./test/*_test.rb
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-queue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aman Gupta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-14 00:00:00.000000000 Z
11
+ date: 2014-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec