parallel_tests 1.0.8 → 1.0.9

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 686483f7dc8498a77a68696e67e20a4306c01227
4
- data.tar.gz: 01b43608ce56b14847094336251caeb00b19b334
3
+ metadata.gz: dbd377cc06273701434d7d01cd12c2da000425f1
4
+ data.tar.gz: cb7bd407b705223e273146cefff4dad1e3845b1d
5
5
  SHA512:
6
- metadata.gz: e12060b53c7dda0bf83378bc4281b732bc95c530ac3b91ece0cd6a5ac99c9ef93d8be70b19c36403c34fdc2db09a158d688b5925020991d6eda0033c131f0ad1
7
- data.tar.gz: 095d5a39cd83a0789c18c0366915c8ddb18866cf461892179fae0dfcc09d6754191f6cab9b0195162ea3c2cc446b6416ee58d5efc53a568f5433dc3aeff011d8
6
+ metadata.gz: 7d155b74b7ea83a7521decb4dcaf72d2cccb97f3eb8d43950424001e57b20b895d2f826d93b2960351e7d5435bf055e4d4a829d6baff7dcfe9d391591987ddac
7
+ data.tar.gz: 66a159a28709388b78930da6e2e772b6dcc2898f6d3743a869d6d45e4292af65edfa4960daa0cca41a5e0f313d6a5b6b17d1489ac3033d5d46b649165362ecb9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- parallel_tests (1.0.8)
4
+ parallel_tests (1.0.9)
5
5
  parallel
6
6
 
7
7
  GEM
data/Readme.md CHANGED
@@ -180,6 +180,7 @@ Options are:
180
180
  -o, --test-options '[OPTIONS]' execute test commands with those options
181
181
  -t, --type [TYPE] test(default) / rspec / cucumber / spinach
182
182
  --serialize-stdout Serialize stdout output, nothing will be written until everything is done
183
+ --combine-stderr Combine stderr into stdout, useful in conjunction with --serialize-stdout
183
184
  --non-parallel execute same commands but do not in parallel, needs --exec
184
185
  --no-symlinks Do not traverse symbolic links to find test files
185
186
  --ignore-tags [PATTERN] When counting steps ignore scenarios with tags that match this pattern
@@ -300,6 +301,7 @@ inspired by [pivotal labs](http://pivotallabs.com/users/miked/blog/articles/849-
300
301
  - [Dmitry Polushkin](https://github.com/dmitry)
301
302
  - [Samer Masry](https://github.com/smasry)
302
303
  - [Volodymyr Mykhailyk](https:/github.com/volodymyr-mykhailyk)
304
+ - [Mike Mueller](https://github.com/mmueller)
303
305
 
304
306
  [Michael Grosser](http://grosser.it)<br/>
305
307
  michael@grosser.it<br/>
@@ -139,6 +139,7 @@ TEXT
139
139
  end
140
140
  end
141
141
  opts.on("--serialize-stdout", "Serialize stdout output, nothing will be written until everything is done") { options[:serialize_stdout] = true }
142
+ opts.on("--combine-stderr", "Combine stderr into stdout, useful in conjunction with --serialize-stdout") { options[:combine_stderr] = true }
142
143
  opts.on("--non-parallel", "execute same commands but do not in parallel, needs --exec") { options[:non_parallel] = true }
143
144
  opts.on("--no-symlinks", "Do not traverse symbolic links to find test files") { options[:symlinks] = false }
144
145
  opts.on('--ignore-tags [PATTERN]', 'When counting steps ignore scenarios with tags that match this pattern') { |arg| options[:ignore_tag_pattern] = arg }
@@ -57,6 +57,8 @@ module ParallelTests
57
57
  "PARALLEL_TEST_GROUPS" => num_processes
58
58
  )
59
59
  cmd = "nice #{cmd}" if options[:nice]
60
+ cmd = "#{cmd} 2>&1" if options[:combine_stderr]
61
+
60
62
  execute_command_and_capture_output(env, cmd, options[:serialize_stdout])
61
63
  end
62
64
 
@@ -1,3 +1,3 @@
1
1
  module ParallelTests
2
- VERSION = Version = '1.0.8'
2
+ VERSION = Version = '1.0.9'
3
3
  end
@@ -114,6 +114,15 @@ describe 'CLI' do
114
114
  result.should_not =~ /TEST2.*TEST1.*TEST2/m
115
115
  end
116
116
 
117
+ it "can serialize stdout and stderr" do
118
+ write 'spec/xxx_spec.rb', '5.times{describe("it"){it("should"){sleep 0.01; $stderr.puts "errTEST1"; puts "TEST1"}}}'
119
+ write 'spec/xxx2_spec.rb', 'sleep 0.01; 5.times{describe("it"){it("should"){sleep 0.01; $stderr.puts "errTEST2"; puts "TEST2"}}}'
120
+ result = run_tests "spec", :type => 'rspec', :add => "--serialize-stdout --combine-stderr"
121
+
122
+ result.should_not =~ /TEST1.*TEST2.*TEST1/m
123
+ result.should_not =~ /TEST2.*TEST1.*TEST2/m
124
+ end
125
+
117
126
  context "with given commands" do
118
127
  it "can exec given commands with ENV['TEST_ENV_NUM']" do
119
128
  result = `#{executable} -e 'ruby -e "print ENV[:TEST_ENV_NUMBER.to_s].to_i"' -n 4`
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel_tests
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser