parallel_tests 0.12.0 → 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/parallel_tests.rb +9 -0
- data/lib/parallel_tests/cli.rb +1 -0
- data/lib/parallel_tests/cucumber/io.rb +2 -0
- data/lib/parallel_tests/cucumber/runtime_logger.rb +2 -2
- data/lib/parallel_tests/rspec/runtime_logger.rb +3 -2
- data/lib/parallel_tests/test/runtime_logger.rb +3 -2
- data/lib/parallel_tests/version.rb +1 -1
- metadata +4 -4
data/Gemfile.lock
CHANGED
data/lib/parallel_tests.rb
CHANGED
@@ -47,4 +47,13 @@ module ParallelTests
|
|
47
47
|
raise "Could not grep for processes -> #{result}" if result.strip != "" && !$?.success?
|
48
48
|
result.split("\n").size
|
49
49
|
end
|
50
|
+
|
51
|
+
# real time even if someone messed with timecop in tests
|
52
|
+
def self.now
|
53
|
+
if Time.respond_to?(:now_without_mock_time) # Timecop
|
54
|
+
Time.now_without_mock_time
|
55
|
+
else
|
56
|
+
Time.now
|
57
|
+
end
|
58
|
+
end
|
50
59
|
end
|
data/lib/parallel_tests/cli.rb
CHANGED
@@ -11,11 +11,11 @@ module ParallelTests
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def before_feature(_)
|
14
|
-
@start_at =
|
14
|
+
@start_at = ParallelTests.now.to_f
|
15
15
|
end
|
16
16
|
|
17
17
|
def after_feature(feature)
|
18
|
-
@example_times[feature.file] +=
|
18
|
+
@example_times[feature.file] += ParallelTests.now.to_f - @start_at
|
19
19
|
end
|
20
20
|
|
21
21
|
def after_features(*args)
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'parallel_tests'
|
1
2
|
require 'parallel_tests/rspec/logger_base'
|
2
3
|
|
3
4
|
class ParallelTests::RSpec::RuntimeLogger < ParallelTests::RSpec::LoggerBase
|
@@ -7,12 +8,12 @@ class ParallelTests::RSpec::RuntimeLogger < ParallelTests::RSpec::LoggerBase
|
|
7
8
|
end
|
8
9
|
|
9
10
|
def example_started(*args)
|
10
|
-
@time =
|
11
|
+
@time = ParallelTests.now
|
11
12
|
end
|
12
13
|
|
13
14
|
def example_passed(example)
|
14
15
|
file = example.location.split(':').first
|
15
|
-
@example_times[file] +=
|
16
|
+
@example_times[file] += ParallelTests.now - @time
|
16
17
|
end
|
17
18
|
|
18
19
|
def dump_summary(*args);end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'parallel_tests'
|
1
2
|
require 'parallel_tests/test/runner'
|
2
3
|
|
3
4
|
module ParallelTests
|
@@ -82,9 +83,9 @@ class ::Test::Unit::TestSuite
|
|
82
83
|
alias :run_without_timing :run unless defined? @@timing_installed
|
83
84
|
|
84
85
|
def run(result, &progress_block)
|
85
|
-
start_time=
|
86
|
+
start_time = ParallelTests.now
|
86
87
|
run_without_timing(result, &progress_block)
|
87
|
-
end_time=
|
88
|
+
end_time = ParallelTests.now
|
88
89
|
ParallelTests::Test::RuntimeLogger.log(self.tests.first, start_time, end_time)
|
89
90
|
end
|
90
91
|
|
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: 0.12.
|
4
|
+
version: 0.12.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: parallel
|
@@ -96,7 +96,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
96
96
|
version: '0'
|
97
97
|
segments:
|
98
98
|
- 0
|
99
|
-
hash:
|
99
|
+
hash: -2065934911726419013
|
100
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
101
|
none: false
|
102
102
|
requirements:
|
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
105
|
version: '0'
|
106
106
|
segments:
|
107
107
|
- 0
|
108
|
-
hash:
|
108
|
+
hash: -2065934911726419013
|
109
109
|
requirements: []
|
110
110
|
rubyforge_project:
|
111
111
|
rubygems_version: 1.8.25
|