parallel_tests 0.16.6 → 0.16.7
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 +4 -4
- data/Gemfile.lock +1 -1
- data/Readme.md +1 -0
- data/lib/parallel_tests/tasks.rb +4 -2
- data/lib/parallel_tests/version.rb +1 -1
- data/spec/parallel_tests/tasks_spec.rb +6 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0401013c4446f58aa5d69d8af58e42fbe445716
|
4
|
+
data.tar.gz: 21c76a3992e163e0e469a4e999ab72d479c3d7d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5e028be9def6bd10ca21c494f391e11fb18dce725e3bf46db8c3a312b4b5c2cbb29f1c73a59517f219acdd500ea33be1cc7721c8355cc35532111d153de2096
|
7
|
+
data.tar.gz: 9b1bc90b9bbe330f55a70782b59d77f3f3c0a145597daa8c3167bd78b2e1520365dd3a014fe2e0dc1e6a44496d34d8f5d49eac253c5c43c445bbf7236a7d3a9b
|
data/Gemfile.lock
CHANGED
data/Readme.md
CHANGED
@@ -291,6 +291,7 @@ inspired by [pivotal labs](http://pivotallabs.com/users/miked/blog/articles/849-
|
|
291
291
|
- [sidfarkus](https://github.com/sidfarkus)
|
292
292
|
- [Colin Harris](https://github.com/aberant)
|
293
293
|
- [Wataru MIYAGUNI](https://github.com/gongo)
|
294
|
+
- [Brandon Turner](https://github.com/blt04)
|
294
295
|
|
295
296
|
[Michael Grosser](http://grosser.it)<br/>
|
296
297
|
michael@grosser.it<br/>
|
data/lib/parallel_tests/tasks.rb
CHANGED
@@ -30,8 +30,10 @@ module ParallelTests
|
|
30
30
|
activate_pipefail = "set -o pipefail"
|
31
31
|
remove_ignored_lines = %Q{(grep -v "#{ignore_regex}" || test 1)}
|
32
32
|
|
33
|
-
if system("#{activate_pipefail} 2>/dev/null && test 1")
|
34
|
-
|
33
|
+
if File.executable?('/bin/bash') && system('/bin/bash', '-c', "#{activate_pipefail} 2>/dev/null && test 1")
|
34
|
+
# We need to shell escape single quotes (' becomes '"'"') because
|
35
|
+
# run_in_parallel wraps command in single quotes
|
36
|
+
%Q{/bin/bash -c '"'"'#{activate_pipefail} && (#{command}) | #{remove_ignored_lines}'"'"'}
|
35
37
|
else
|
36
38
|
command
|
37
39
|
end
|
@@ -91,13 +91,16 @@ describe ParallelTests::Tasks do
|
|
91
91
|
|
92
92
|
describe ".suppress_output" do
|
93
93
|
def call(command, grep)
|
94
|
-
|
94
|
+
# Explictly run as a parameter to /bin/sh to simulate how
|
95
|
+
# the command will be run by parallel_test --exec
|
96
|
+
# This also tests shell escaping of single quotes
|
97
|
+
result = `/bin/sh -c '#{ParallelTests::Tasks.suppress_output(command, grep)}'`
|
95
98
|
[result, $?.success?]
|
96
99
|
end
|
97
100
|
|
98
101
|
context "with pipefail supported" do
|
99
102
|
before :all do
|
100
|
-
if not system("set -o pipefail 2>/dev/null && test 1")
|
103
|
+
if not system("/bin/bash", "-c", "set -o pipefail 2>/dev/null && test 1")
|
101
104
|
pending "pipefail is not supported on your system"
|
102
105
|
end
|
103
106
|
end
|
@@ -121,7 +124,7 @@ describe ParallelTests::Tasks do
|
|
121
124
|
|
122
125
|
context "without pipefail supported" do
|
123
126
|
before do
|
124
|
-
ParallelTests::Tasks.should_receive(:system).with(
|
127
|
+
ParallelTests::Tasks.should_receive(:system).with('/bin/bash', '-c', 'set -o pipefail 2>/dev/null && test 1').and_return false
|
125
128
|
end
|
126
129
|
|
127
130
|
it "should not filter and succeed" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parallel_tests
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|