learn-xcpretty 0.1.11
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 +7 -0
- data/.gitignore +18 -0
- data/.kick +17 -0
- data/.travis.yml +18 -0
- data/CHANGELOG.md +152 -0
- data/CONTRIBUTING.md +60 -0
- data/Gemfile +8 -0
- data/LICENSE.txt +61 -0
- data/README.md +143 -0
- data/Rakefile +24 -0
- data/assets/report.html.erb +155 -0
- data/bin/learn-xcpretty +80 -0
- data/features/custom_formatter.feature +15 -0
- data/features/fixtures/xcodebuild.log +5963 -0
- data/features/html_report.feature +40 -0
- data/features/json_compilation_database_report.feature +21 -0
- data/features/junit_report.feature +44 -0
- data/features/knock_format.feature +11 -0
- data/features/simple_format.feature +172 -0
- data/features/steps/formatting_steps.rb +268 -0
- data/features/steps/html_steps.rb +23 -0
- data/features/steps/json_steps.rb +37 -0
- data/features/steps/junit_steps.rb +38 -0
- data/features/steps/report_steps.rb +21 -0
- data/features/steps/xcpretty_steps.rb +31 -0
- data/features/support/env.rb +108 -0
- data/features/tap_format.feature +31 -0
- data/features/test_format.feature +39 -0
- data/features/xcpretty.feature +14 -0
- data/learn-xcpretty.gemspec +37 -0
- data/lib/xcpretty/ansi.rb +71 -0
- data/lib/xcpretty/formatters/formatter.rb +134 -0
- data/lib/xcpretty/formatters/knock.rb +34 -0
- data/lib/xcpretty/formatters/rspec.rb +27 -0
- data/lib/xcpretty/formatters/simple.rb +155 -0
- data/lib/xcpretty/formatters/tap.rb +39 -0
- data/lib/xcpretty/parser.rb +421 -0
- data/lib/xcpretty/printer.rb +20 -0
- data/lib/xcpretty/reporters/html.rb +73 -0
- data/lib/xcpretty/reporters/json_compilation_database.rb +58 -0
- data/lib/xcpretty/reporters/junit.rb +99 -0
- data/lib/xcpretty/reporters/learn.rb +154 -0
- data/lib/xcpretty/snippet.rb +34 -0
- data/lib/xcpretty/syntax.rb +20 -0
- data/lib/xcpretty/version.rb +3 -0
- data/lib/xcpretty.rb +39 -0
- data/spec/fixtures/NSStringTests.m +64 -0
- data/spec/fixtures/constants.rb +546 -0
- data/spec/fixtures/custom_formatter.rb +17 -0
- data/spec/fixtures/oneliner.m +1 -0
- data/spec/fixtures/raw_kiwi_compilation_fail.txt +24 -0
- data/spec/fixtures/raw_kiwi_fail.txt +1896 -0
- data/spec/fixtures/raw_specta_fail.txt +3110 -0
- data/spec/spec_helper.rb +6 -0
- data/spec/support/matchers/colors.rb +20 -0
- data/spec/xcpretty/ansi_spec.rb +46 -0
- data/spec/xcpretty/formatters/formatter_spec.rb +113 -0
- data/spec/xcpretty/formatters/rspec_spec.rb +55 -0
- data/spec/xcpretty/formatters/simple_spec.rb +129 -0
- data/spec/xcpretty/parser_spec.rb +421 -0
- data/spec/xcpretty/printer_spec.rb +53 -0
- data/spec/xcpretty/snippet_spec.rb +39 -0
- data/spec/xcpretty/syntax_spec.rb +35 -0
- data/vendor/json_pure/COPYING +57 -0
- data/vendor/json_pure/LICENSE +340 -0
- data/vendor/json_pure/generator.rb +443 -0
- data/vendor/json_pure/parser.rb +364 -0
- metadata +261 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 65f7f816be51d48b2e9bcb4bdd05c51a51336587
|
4
|
+
data.tar.gz: f554501a1d8489769f1a2d9a576ba00aa5b4e176
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 923ae7ae9ea20eb138779a766020da8c86bb717d422ad19c9981ce316a4a1d45c70b03740bad18d552b56d1ef2ec0fb1cf57f146607b6252df90c40ed65b8bb3
|
7
|
+
data.tar.gz: 610a03fb112cb22882f1809b1e06589a3be12ba13729714300941302ef74c0a670ed235c967fa21aeceaf86f24831f8221cccaaa8a85b934232577c147e848ed
|
data/.gitignore
ADDED
data/.kick
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
recipe :ruby
|
2
|
+
recipe :ignore
|
3
|
+
|
4
|
+
ignore(%r{^(spec/fixtures)})
|
5
|
+
|
6
|
+
process do |files|
|
7
|
+
cuke_files = files.take_and_map do |path|
|
8
|
+
if path =~ %r{^features/\w+\.feature$}
|
9
|
+
path
|
10
|
+
elsif path =~ %r{^bin}
|
11
|
+
# run all features when bin/xcpretty changes
|
12
|
+
Dir.glob("features/**/*.feature")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
execute "cucumber -f progress #{cuke_files.join(' ')}"
|
17
|
+
end
|
data/.travis.yml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
language: ruby
|
2
|
+
|
3
|
+
#travis workaround for bundler failing on 1.8.7
|
4
|
+
before_install:
|
5
|
+
- gem update --system 2.1.11
|
6
|
+
- gem --version
|
7
|
+
|
8
|
+
install:
|
9
|
+
- bundle install
|
10
|
+
|
11
|
+
rvm:
|
12
|
+
- 2.1.0
|
13
|
+
- 2.0.0
|
14
|
+
- 1.9.3
|
15
|
+
- 1.8.7
|
16
|
+
|
17
|
+
script: rake ci
|
18
|
+
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,152 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 0.1.5
|
4
|
+
|
5
|
+
###### Enhancements
|
6
|
+
|
7
|
+
* Json-compilation-databse report!
|
8
|
+
| [Boris Bügling](https://github.com/neonichu)
|
9
|
+
| [#77](https://github.com/supermarin/xcpretty/pull/77)
|
10
|
+
* Parsing duplicate symbols
|
11
|
+
| [#78](https://github.com/supermarin/xcpretty/pull/78)
|
12
|
+
* Improved performance (nobody cares)
|
13
|
+
|
14
|
+
###### Bug Fixes
|
15
|
+
|
16
|
+
* Fix closing files when used from another proccess
|
17
|
+
| [Jonas Witt](https://github.com/jonaswitt)
|
18
|
+
| [#75](http://github.com/supermarin/xcpretty/pull/75)
|
19
|
+
|
20
|
+
|
21
|
+
## 0.1.4
|
22
|
+
|
23
|
+
###### Enhancements
|
24
|
+
|
25
|
+
* New logo
|
26
|
+
* New output format: tap
|
27
|
+
* New output format: knock
|
28
|
+
* Updated parser to support Specta 0.2.1
|
29
|
+
| [Josh Vickery](https://github.com/vickeryj)
|
30
|
+
| [#64](https://github.com/supermarin/xcpretty/pull/64)
|
31
|
+
* Support additional file extensions
|
32
|
+
| [Boris Bügling](https://github.com/neonichu)
|
33
|
+
| [#59](https://github.com/supermarin/xcpretty/pull/59)
|
34
|
+
|
35
|
+
|
36
|
+
## 0.1.3
|
37
|
+
|
38
|
+
###### Enhancements
|
39
|
+
|
40
|
+
* Indented test runs by suite
|
41
|
+
* Added HTML reporter
|
42
|
+
|
43
|
+
###### Misc
|
44
|
+
|
45
|
+
* removed the faux exit statuts hangling. use `exit ${PIPESTATUS[0]}`
|
46
|
+
|
47
|
+
|
48
|
+
## 0.1.2
|
49
|
+
|
50
|
+
###### Enhancements
|
51
|
+
|
52
|
+
* More consistent error output (add some spacing before and after)
|
53
|
+
* Parsed clang errors
|
54
|
+
* Parsed ld: errors
|
55
|
+
|
56
|
+
|
57
|
+
## 0.1.1
|
58
|
+
|
59
|
+
###### Enhancements
|
60
|
+
|
61
|
+
* Parse more fatal errors, and CodeSign errors that were printed to STDOUT |
|
62
|
+
[#51](https://github.com/mneorr/XCPretty/issues/51)
|
63
|
+
|
64
|
+
|
65
|
+
## 0.1.0
|
66
|
+
|
67
|
+
###### Enhancements
|
68
|
+
|
69
|
+
* Color semi-slow tests in yellow, slow tests in red |
|
70
|
+
[#46](https://github.com/mneorr/xcpretty/pull/46)
|
71
|
+
* Add option to specify a custom location for report generation |
|
72
|
+
[#43](https://github.com/mneorr/XCPretty/pull/43)
|
73
|
+
|
74
|
+
|
75
|
+
## 0.0.9
|
76
|
+
|
77
|
+
###### Enhancements
|
78
|
+
|
79
|
+
* major performance fix, it's faster than `cat` by 2-3 times on big inputs.
|
80
|
+
Thanks [@kviksilver](https://github.com/kviksilver) for providing debug log and helping to reproduce
|
81
|
+
|
82
|
+
|
83
|
+
## 0.0.8
|
84
|
+
|
85
|
+
###### Bug Fixes
|
86
|
+
|
87
|
+
* show version if not piped |
|
88
|
+
[#39](https://github.com/mneorr/XCPretty/issues/39)
|
89
|
+
|
90
|
+
###### Enhancements
|
91
|
+
|
92
|
+
* format linker failures (Undefined symbols for arch...)
|
93
|
+
|
94
|
+
|
95
|
+
## 0.0.7
|
96
|
+
|
97
|
+
###### Enhancements
|
98
|
+
|
99
|
+
* exit(1) if xcodebuild failure detected
|
100
|
+
* Print compile errors nicely. Currently we support compiler erorrs,
|
101
|
+
and Pods-not-installed errors. Missing mach-o-linker failures
|
102
|
+
* Added support for loading arbitrary custom printers (experimental) |
|
103
|
+
[Eloy Durán](https://github.com/alloy) |
|
104
|
+
[#29](https://github.com/mneorr/xcpretty/pulls/29)
|
105
|
+
* Show help banner in case no data is piped in |
|
106
|
+
[Eloy Durán](https://github.com/alloy) |
|
107
|
+
[#29](https://github.com/mneorr/xcpretty/pulls/29)
|
108
|
+
|
109
|
+
|
110
|
+
## 0.0.6
|
111
|
+
|
112
|
+
###### Enhancements
|
113
|
+
|
114
|
+
* Added support for reporters
|
115
|
+
* Added JUnit reporter
|
116
|
+
|
117
|
+
|
118
|
+
## 0.0.5
|
119
|
+
|
120
|
+
###### Bug Fixes
|
121
|
+
|
122
|
+
* `--no-utf` was set incorrectly. now it works as expected.
|
123
|
+
|
124
|
+
|
125
|
+
## 0.0.4
|
126
|
+
|
127
|
+
###### Enhancements
|
128
|
+
|
129
|
+
* Prettier `--simple` output |
|
130
|
+
[Preview](https://travis-ci.org/allending/Kiwi/builds/15190533)
|
131
|
+
* Removed Paint dependency
|
132
|
+
* Better test failure formatting (added indentation, grouped by suite)
|
133
|
+
* Added example of running tests continuously
|
134
|
+
* Support for not using Unicode (`--no-utf`)
|
135
|
+
|
136
|
+
###### Bug Fixes
|
137
|
+
|
138
|
+
* Fixed multi-suite summary output (when tests are run on many devices)
|
139
|
+
|
140
|
+
|
141
|
+
## 0.0.3
|
142
|
+
|
143
|
+
* add Ruby 1.8 support
|
144
|
+
|
145
|
+
## 0.0.2
|
146
|
+
|
147
|
+
* add Ruby 1.9 support
|
148
|
+
|
149
|
+
## 0.0.1
|
150
|
+
|
151
|
+
* initial version
|
152
|
+
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
## Pull requests
|
2
|
+
|
3
|
+
XCPretty is tested with [Cucumber](http://cukes.info) and [RSpec](http://rspec.info).
|
4
|
+
If you're planning to contribute, please do write tests.
|
5
|
+
|
6
|
+
Here's an example workflow for a contribution:
|
7
|
+
|
8
|
+
#### 1. Write a failing feature
|
9
|
+
|
10
|
+
- These are a full-stack end to end tests
|
11
|
+
- You can find features in `features/`. You'll need to write a `feature` and implement it's `steps`.
|
12
|
+
- Try to reuse as many matchers as possible
|
13
|
+
- This tests are slower because they're executing `xcpretty` command for each test
|
14
|
+
|
15
|
+
Here's an example feature for adding output without UTF8:
|
16
|
+
|
17
|
+
``` gherkin
|
18
|
+
Scenario: Running tests without UTF-8 support
|
19
|
+
Given I have a passing test in my suite
|
20
|
+
And I pipe to xcpretty with "--no-utf"
|
21
|
+
Then I should see a non-utf prefixed output
|
22
|
+
```
|
23
|
+
|
24
|
+
And the steps:
|
25
|
+
|
26
|
+
- `Given I have a passing test in my suite`
|
27
|
+
|
28
|
+
``` ruby
|
29
|
+
Given(/^I have a passing test in my suite$/) do
|
30
|
+
add_run_input SAMPLE_OCUNIT_TEST
|
31
|
+
end
|
32
|
+
```
|
33
|
+
|
34
|
+
- `And I pipe to xcpretty with "--no-utf"`
|
35
|
+
|
36
|
+
``` ruby
|
37
|
+
When(/^I pipe to xcpretty with "(.*?)"$/) do |flags|
|
38
|
+
run_xcpretty(flags)
|
39
|
+
end
|
40
|
+
```
|
41
|
+
|
42
|
+
- `Then I should see a non-utf prefixed output`
|
43
|
+
|
44
|
+
``` ruby
|
45
|
+
Then(/^I should see a non-utf prefixed output$/) do
|
46
|
+
run_output.should start_with(".")
|
47
|
+
end
|
48
|
+
```
|
49
|
+
|
50
|
+
|
51
|
+
#### 2. Write a failing BDD test
|
52
|
+
|
53
|
+
- These are unit tests, and they're very fast (below 200ms for the entire suite)
|
54
|
+
- You should be running them continuously with `kicker`, or your awesome Vim binding
|
55
|
+
|
56
|
+
|
57
|
+
#### 3. Implement your awesome contribution
|
58
|
+
|
59
|
+
- This should fix unit tests one-by-one, and finally your `feature` will be passing
|
60
|
+
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
Copyright (c) 2013 Marin Usalj
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
..,,,,,,,,,,,,. ......
|
6
|
+
.,,,,,,,,,,,,,,,,,,,,,,,,. ..,,,,,,,,,,
|
7
|
+
.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.
|
8
|
+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
9
|
+
.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;1111111
|
10
|
+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;i111111i,,,,,,,,11111111
|
11
|
+
,,,,,,,,,,,.. .,,,,,,,,,,,,,,,,,,,.:11111111111iii11111111111
|
12
|
+
,,,,,,,,:;i111111111111,,,,,,,,,,,,,,,:111. :1111111111111111111111
|
13
|
+
11:,,,,,:111111111111111, i11,,,,,,,,,,,;111111 ;1111111111111111111
|
14
|
+
1i,,,,i111111111111111: 11111;,,,,,,,,,11111111 11111111111111111
|
15
|
+
11,:1111111111111111; .1111111,,,,,,,,,111111111. i11111111111111
|
16
|
+
11111111111111111. i111111111,,,,,,,,11111111111. 11111111111
|
17
|
+
111111111111111i .1111111111,,,,,,,,111111111111, .111111111
|
18
|
+
11111111111111: 11111111111i,,,,,,,i11111111111.; 11111111
|
19
|
+
1111111111111. :111111111111,,,,,,,:11111111111 ; 111111111
|
20
|
+
111111111111 1111111111111,,,,,,,,11111111111 , ;1111111111
|
21
|
+
11111111111 , :111111111111;,,,,,,,11111111111 ,11111111111
|
22
|
+
1111111111 , i111111111111,,,,,,,1111111111; i111111111
|
23
|
+
111111111 , 111111111111,,,,,,,1111111111. 11111111
|
24
|
+
11111111111;.., 11111111111:,,,,,,i111111111 .111111
|
25
|
+
111111111111i .11111111111,,,,,,;111111111 ;111111
|
26
|
+
11111111111, .1111111111,,,,,,,111111111 1111111
|
27
|
+
111111111i :111111111CCCCCCCt1111111: ,1111111
|
28
|
+
11111111. ;1111111tCCCCCCCCt111111 11111111
|
29
|
+
111111111. i111111CCCCCCCCCCt11111 11111111
|
30
|
+
1111111111; 11111tCCCCCCCCCCCt111; i11111111
|
31
|
+
111111111111 1111fCCCCCCCCCCCC111 111111111
|
32
|
+
1111111111111 111LCCCCCCCCCCCCf11 ;111111111
|
33
|
+
11111111111111: i1CCCCCCCCCCCCCCt. 1111111111
|
34
|
+
111111111111111i ;CCCCCCCCCCCCCCL :1111111111
|
35
|
+
11111111111111111 :CCCCCCCCCCCCC, 11111111111
|
36
|
+
111111111111111111: .CCCCCCCCCCCC ,11111111111
|
37
|
+
1111111111111111111i CCCCCCCCCC. 111111111111
|
38
|
+
111111111111111111111 LCCCCCCCC :111111111111
|
39
|
+
1111111111111111111111, 1CCCCCC. 1111111111111
|
40
|
+
11111111111111111111111i ,CCCCL i1111111111111
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
45
|
+
a copy of this software and associated documentation files (the
|
46
|
+
"Software"), to deal in the Software without restriction, including
|
47
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
48
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
49
|
+
permit persons to whom the Software is furnished to do so, subject to
|
50
|
+
the following conditions:
|
51
|
+
|
52
|
+
The above copyright notice and this permission notice shall be
|
53
|
+
included in all copies or substantial portions of the Software.
|
54
|
+
|
55
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
56
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
57
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
58
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
59
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
60
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
61
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,143 @@
|
|
1
|
+
# Learn
|
2
|
+
|
3
|
+
You must have xcode setup with an account with certification to run tests.
|
4
|
+
|
5
|
+
To run tests with learn-xcpretty in command line and report to ironbroker, enter:
|
6
|
+
|
7
|
+
```
|
8
|
+
xcodebuild -workspace yourworkspace.xcworkspace/ -scheme yourscheme test -sdk iphonesimulator7.1 | learn-xcpretty -t --report learn
|
9
|
+
```
|
10
|
+
|
11
|
+
Currently, this will send to `staging.ironbroker.flatironschool.com`
|
12
|
+
|
13
|
+
|
14
|
+

|
15
|
+
|
16
|
+
__`learn-xcpretty` is a fast and flexible formatter for `xcodebuild`__.<br/>
|
17
|
+
It does one thing, and it should do it well.
|
18
|
+
|
19
|
+
[](http://rubygems.org/gems/xcpretty)
|
20
|
+
[](https://travis-ci.org/supermarin/xcpretty)
|
21
|
+
[](https://codeclimate.com/github/supermarin/xcpretty)
|
22
|
+
|
23
|
+
## Installation
|
24
|
+
``` bash
|
25
|
+
$ gem install learn-xcpretty
|
26
|
+
```
|
27
|
+
|
28
|
+
## Usage
|
29
|
+
``` bash
|
30
|
+
$ xcodebuild [flags] | learn-xcpretty -c
|
31
|
+
```
|
32
|
+
`learn-xcpretty` is designed to be piped with `xcodebuild` and thus keeping 100% compatibility with it.
|
33
|
+
It's even a bit faster than `xcodebuild` only, since it saves your terminal some prints.
|
34
|
+
|
35
|
+
__Important:__ If you're running `learn-xcpretty` on a CI like Travis or Jenkins, you may want to exit with same status code as `xcodebuild`.
|
36
|
+
CI uses the status code to determine if build has failed.
|
37
|
+
|
38
|
+
``` bash
|
39
|
+
$ set -o pipefail && xcodebuild [flags] | learn-xcpretty -c
|
40
|
+
#
|
41
|
+
# OR
|
42
|
+
#
|
43
|
+
$ xcodebuild [flags] | learn-xcpretty -c && exit ${PIPESTATUS[0]}
|
44
|
+
```
|
45
|
+
|
46
|
+
## Formats
|
47
|
+
|
48
|
+
- `--color`, `-c` (you can add it to `--simple` or `--test` format)
|
49
|
+
- `--no-utf` (use only ASCII characters in output)
|
50
|
+
|
51
|
+
- `--simple`, `-s` (default)
|
52
|
+

|
53
|
+
|
54
|
+
- `--test`, `-t` (RSpec style)
|
55
|
+

|
56
|
+
- `--tap` ([Test Anything Protocol](http://testanything.org)-compatible output)
|
57
|
+
- `--knock`, `-k` (a [simplified version](https://github.com/chneukirchen/knock) of the Test Anything Protocol)
|
58
|
+
|
59
|
+
|
60
|
+
## Reporters
|
61
|
+
|
62
|
+
- `--report junit`, `-r junit`: Creates a JUnit-style XML report at `build/reports/junit.xml`, compatible with Jenkins and TeamCity CI.
|
63
|
+
|
64
|
+
- `--report html`, `-r html`: Creates a simple HTML report at `build/reports/tests.html`.
|
65
|
+

|
66
|
+
|
67
|
+
- `--report json-compilation-database`, `-r json-compilation-database`: Creates a [JSON compilation database](http://clang.llvm.org/docs/JSONCompilationDatabase.html) at `build/reports/compilation.json`. This is a format to replay single compilations independently of the build system.
|
68
|
+
|
69
|
+
Writing a report to a custom path can be specified using `--output PATH`.
|
70
|
+
|
71
|
+
## Did you just clone xctool?
|
72
|
+
|
73
|
+
Unlike [xctool](https://github.com/facebook/xctool), `xcpretty` isn't a build tool.
|
74
|
+
It relies on `xcodebuild` to do the build process, and it formats the output.
|
75
|
+
|
76
|
+
By the time when [xctool](https://github.com/facebook/xctool) was made, `xcodebuild`
|
77
|
+
wasn't aware of the `test` command, thus running tests in general via CLI was a pain.
|
78
|
+
At this point `xcodebuild` has been improved significantly, and is ready to be used directly.
|
79
|
+
|
80
|
+
|
81
|
+
## Benchmark
|
82
|
+
|
83
|
+
A smaller project ([ObjectiveSugar](https://github.com/supermarin/objectivesugar)) with a fast suite
|
84
|
+
|
85
|
+
#### xcpretty
|
86
|
+
```
|
87
|
+
$ time xcodebuild -workspace ObjectiveSugar.xcworkspace -scheme ObjectiveSugar -sdk iphonesimulator test | xcpretty -tc
|
88
|
+
....................................................................................
|
89
|
+
|
90
|
+
Executed 84 tests, with 0 failures (0 unexpected) in 0.070 (0.094) seconds
|
91
|
+
4.08 real 5.82 user 2.08 sys
|
92
|
+
```
|
93
|
+
#### xcodebuild
|
94
|
+
```
|
95
|
+
$ time xcodebuild -workspace ObjectiveSugar.xcworkspace -scheme ObjectiveSugar -sdk iphonesimulator test
|
96
|
+
... ommitted output ...
|
97
|
+
Executed 84 tests, with 0 failures (0 unexpected) in 0.103 (0.129) seconds
|
98
|
+
** TEST SUCCEEDED **
|
99
|
+
|
100
|
+
4.35 real 6.07 user 2.21 sys
|
101
|
+
```
|
102
|
+
#### xctool
|
103
|
+
```
|
104
|
+
$ time xctool -workspace ObjectiveSugar.xcworkspace -scheme ObjectiveSugar -sdk iphonesimulator test
|
105
|
+
... ommitted output ...
|
106
|
+
** TEST SUCCEEDED: 84 passed, 0 failed, 0 errored, 84 total ** (26964 ms)
|
107
|
+
|
108
|
+
28.05 real 6.59 user 2.24 sys
|
109
|
+
```
|
110
|
+
|
111
|
+
A bit bigger project, without CocoaPods ([ReactiveCocoa](https://github.com/ReactiveCocoa/ReactiveCocoa))
|
112
|
+
|
113
|
+
#### xcpretty
|
114
|
+
```
|
115
|
+
$ time xcodebuild -project ReactiveCocoa.xcodeproj -scheme ReactiveCocoa test | xcpretty -tc
|
116
|
+
..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
|
117
|
+
|
118
|
+
Executed 922 tests, with 0 failures (0 unexpected) in 6.437 (6.761) seconds
|
119
|
+
8.72 real 5.73 user 0.81 sys
|
120
|
+
```
|
121
|
+
#### xcodebuild
|
122
|
+
```
|
123
|
+
$ time xcodebuild -project ReactiveCocoa.xcodeproj -scheme ReactiveCocoa test
|
124
|
+
... ommitted output ...
|
125
|
+
Executed 922 tests, with 0 failures (0 unexpected) in 6.542 (6.913) seconds
|
126
|
+
** TEST SUCCEEDED **
|
127
|
+
|
128
|
+
8.82 real 5.65 user 0.75 sys
|
129
|
+
```
|
130
|
+
#### xctool
|
131
|
+
```
|
132
|
+
$ time xctool -project ReactiveCocoa.xcodeproj -scheme ReactiveCocoa test
|
133
|
+
... ommitted output ...
|
134
|
+
** TEST SUCCEEDED: 922 passed, 0 failed, 0 errored, 922 total ** (9584 ms)
|
135
|
+
|
136
|
+
10.80 real 6.72 user 0.76 sys
|
137
|
+
```
|
138
|
+
|
139
|
+
|
140
|
+
## Thanks
|
141
|
+
|
142
|
+
- [Delisa Mason](http://github.com/kattrali) - for being a part of this
|
143
|
+
- [Fred Potter](http://github.com/fpotter) for making xctool and inspiring us
|