parallel_tests 0.16.12 → 0.16.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/parallel_tests.rb +2 -1
- data/lib/parallel_tests/gherkin/runner.rb +1 -2
- data/lib/parallel_tests/rspec/runner.rb +1 -1
- data/lib/parallel_tests/tasks.rb +1 -1
- data/lib/parallel_tests/test/runner.rb +2 -3
- data/lib/parallel_tests/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7160ffdecbfaac64c6328cb2981afd2dc746510
|
4
|
+
data.tar.gz: c1f7abb0e43ab0b321f212a36493cd0e8af50b08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d3df0755815c4badd85f7e4f673a142de61d9d7fd6e39d1d82061ddbc0e2766580f23f0cbfe803258904d93b6f441a6afe8768996db3031cd4ad676f0452007
|
7
|
+
data.tar.gz: 02b347317976bb7449ec760f82741e024b47d75a5a717614e008d1e3c5f996e5403dcde6133f15c906edad89d5f50bd5ea42b4356604ea9f2af5f2dc6b1297b0
|
data/Gemfile.lock
CHANGED
data/lib/parallel_tests.rb
CHANGED
@@ -4,8 +4,9 @@ require "parallel_tests/railtie" if defined? Rails::Railtie
|
|
4
4
|
require "rbconfig"
|
5
5
|
|
6
6
|
module ParallelTests
|
7
|
+
WINDOWS = (RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/)
|
7
8
|
GREP_PROCESSES_COMMAND = \
|
8
|
-
if
|
9
|
+
if WINDOWS
|
9
10
|
"wmic process get commandline | findstr TEST_ENV_NUMBER 2>&1"
|
10
11
|
else
|
11
12
|
"ps -ef | grep [T]EST_ENV_NUMBER= 2>&1"
|
@@ -7,8 +7,7 @@ module ParallelTests
|
|
7
7
|
|
8
8
|
class << self
|
9
9
|
def run_tests(test_files, process_number, num_processes, options)
|
10
|
-
|
11
|
-
sanitized_test_files = test_files.map { |val| windows ? "\"#{val}\"" : Shellwords.escape(val) }
|
10
|
+
sanitized_test_files = test_files.map { |val| WINDOWS ? "\"#{val}\"" : Shellwords.escape(val) }
|
12
11
|
|
13
12
|
options = options.merge(:env => {"AUTOTEST" => "1"}) if $stdout.tty? # display color when we are in a terminal
|
14
13
|
cmd = [
|
@@ -3,7 +3,7 @@ require "parallel_tests/test/runner"
|
|
3
3
|
module ParallelTests
|
4
4
|
module RSpec
|
5
5
|
class Runner < ParallelTests::Test::Runner
|
6
|
-
DEV_NULL = (
|
6
|
+
DEV_NULL = (WINDOWS ? "NUL" : "/dev/null")
|
7
7
|
NAME = 'RSpec'
|
8
8
|
|
9
9
|
class << self
|
data/lib/parallel_tests/tasks.rb
CHANGED
@@ -147,7 +147,7 @@ namespace :parallel do
|
|
147
147
|
"-n #{count} " \
|
148
148
|
"--pattern '#{pattern}' " \
|
149
149
|
"--test-options '#{options}'"
|
150
|
-
if
|
150
|
+
if ParallelTests::WINDOWS
|
151
151
|
ruby_binary = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])
|
152
152
|
command = "#{ruby_binary} #{command}"
|
153
153
|
end
|
@@ -62,10 +62,9 @@ module ParallelTests
|
|
62
62
|
|
63
63
|
def execute_command_and_capture_output(env, cmd, silence)
|
64
64
|
# make processes descriptive / visible in ps -ef
|
65
|
-
|
66
|
-
separator = windows ? ' & ' : ';'
|
65
|
+
separator = (WINDOWS ? ' & ' : ';')
|
67
66
|
exports = env.map do |k,v|
|
68
|
-
if
|
67
|
+
if WINDOWS
|
69
68
|
"(SET \"#{k}=#{v}\")"
|
70
69
|
else
|
71
70
|
"#{k}=#{v};export #{k}"
|