xcpretty-teamcity-formatter 0.0.2 → 0.0.3
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/lib/teamcity_formatter.rb +23 -1
- 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: ad7e4dcbab1fcecca8f1d9f458004180287b8785
|
4
|
+
data.tar.gz: 78fef7ac2e636b541c28947fef09a97495445e7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c36ee23e9b0ba0f0867a045ec74a8e151115197fe5cfbbf9bed6b033f28e2f4c3beddaefed2ba9cb67c0a15c069e974ab5596071ee4b7f48c799c85ead0b86f
|
7
|
+
data.tar.gz: 6cc18f2bb4c08c0b186aea31034ce6be0a99080280cbc42c2a728244cb1cbc3271c27621499f305d2d0e07afa91e4ed2f03c6984b6d0f4eb06bd3169299d3d34
|
data/lib/teamcity_formatter.rb
CHANGED
@@ -1,18 +1,40 @@
|
|
1
1
|
|
2
2
|
class TeamCityFormatter < XCPretty::Simple
|
3
3
|
|
4
|
+
# Used when opening a test target
|
5
|
+
# For example: Test Suite 'Unit Tests.xctest' started at ...
|
4
6
|
def format_test_run_started(name)
|
5
7
|
"##teamcity[testSuiteStarted name='#{name}']"
|
6
8
|
end
|
7
9
|
|
10
|
+
# Used to signal a test target is complete
|
8
11
|
def format_test_run_finished(name, time)
|
9
|
-
|
12
|
+
|
13
|
+
if @previousSuite != nil
|
14
|
+
# Close the last test suite before the target is complete
|
15
|
+
testSuiteFinished(@previousSuite)
|
16
|
+
@previousSuite = nil
|
17
|
+
end
|
18
|
+
|
19
|
+
"##teamcity[testSuiteFinished name='#{name}']"
|
10
20
|
end
|
11
21
|
|
12
22
|
def format_test_suite_started(name)
|
23
|
+
#Skip the All tests, which comes first
|
24
|
+
return "" if name == 'All tests'
|
25
|
+
|
26
|
+
if @previousSuite != nil
|
27
|
+
testSuiteFinished(@previousSuite)
|
28
|
+
end
|
29
|
+
|
30
|
+
@previousSuite = name
|
13
31
|
"##teamcity[testSuiteStarted name='#{name}']"
|
14
32
|
end
|
15
33
|
|
34
|
+
def testSuiteFinished(name)
|
35
|
+
puts "##teamcity[testSuiteFinished name='#{@previousSuite}']"
|
36
|
+
end
|
37
|
+
|
16
38
|
def format_passing_test(suite, test, time)
|
17
39
|
"##teamcity[testStarted name='#{test}']\n" +
|
18
40
|
"##teamcity[testFinished name='#{test}' duration='#{time}']"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcpretty-teamcity-formatter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Myers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xcpretty
|