cukeforker 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -17,11 +17,11 @@ module CukeForker
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def on_worker_finished(worker)
|
20
|
-
log.info "[ worker #{worker.id.to_s.ljust 3} ]
|
20
|
+
log.info "[ worker #{worker.id.to_s.ljust 3} ] #{status_string(worker.failed?).ljust(8)}: #{worker.feature}"
|
21
21
|
end
|
22
22
|
|
23
23
|
def on_run_finished(failed)
|
24
|
-
log.info "[ run ] finished, #{
|
24
|
+
log.info "[ run ] finished, #{status_string failed}"
|
25
25
|
end
|
26
26
|
|
27
27
|
def on_run_interrupted
|
@@ -52,6 +52,10 @@ module CukeForker
|
|
52
52
|
|
53
53
|
private
|
54
54
|
|
55
|
+
def status_string(failed)
|
56
|
+
failed ? 'failed' : 'passed'
|
57
|
+
end
|
58
|
+
|
55
59
|
def log
|
56
60
|
@log ||= (
|
57
61
|
log = Logger.new @io
|
data/lib/cukeforker/version.rb
CHANGED
@@ -8,8 +8,8 @@ module CukeForker
|
|
8
8
|
it "logs all events" do
|
9
9
|
Time.stub(:now => Time.now)
|
10
10
|
|
11
|
-
mock_worker = mock(Worker, :id => "1", :feature => "foo/bar")
|
12
|
-
mock_worker2 = mock(Worker, :id => "15", :feature => "foo/baz")
|
11
|
+
mock_worker = mock(Worker, :id => "1", :feature => "foo/bar", :failed? => false)
|
12
|
+
mock_worker2 = mock(Worker, :id => "15", :feature => "foo/baz", :failed? => true)
|
13
13
|
|
14
14
|
mock_display = mock(VncServer)
|
15
15
|
mock_display.stub(:display).and_return(nil, ":5")
|
@@ -36,8 +36,8 @@ I, [#{timestamp}] INFO -- : [ display :5 ] fetched
|
|
36
36
|
I, [#{timestamp}] INFO -- : [ worker 1 ] starting: foo/bar
|
37
37
|
I, [#{timestamp}] INFO -- : [ worker 15 ] starting: foo/baz
|
38
38
|
I, [#{timestamp}] INFO -- : [ eta 10/255] #{Time.now.strftime "%Y-%m-%d %H:%M:%S"}
|
39
|
-
I, [#{timestamp}] INFO -- : [ worker 1 ]
|
40
|
-
I, [#{timestamp}] INFO -- : [ worker 15 ]
|
39
|
+
I, [#{timestamp}] INFO -- : [ worker 1 ] passed : foo/bar
|
40
|
+
I, [#{timestamp}] INFO -- : [ worker 15 ] failed : foo/baz
|
41
41
|
I, [#{timestamp}] INFO -- : [ display :5 ] released
|
42
42
|
I, [#{timestamp}] INFO -- : [ run ] interrupted - please wait
|
43
43
|
I, [#{timestamp}] INFO -- : [ run ] finished, passed
|