xcknife 0.6.6 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/tests.yml +24 -0
- data/.gitignore +4 -1
- data/.rubocop.yml +168 -0
- data/.ruby-version +1 -1
- data/.vscode/configure.sh +23 -0
- data/.vscode/vscode_ruby.json.template +44 -0
- data/Gemfile +10 -2
- data/Gemfile.lock +63 -0
- data/OWNERS.yml +2 -0
- data/README.md +9 -1
- data/Rakefile +16 -11
- data/TestDumper/README.md +2 -1
- data/TestDumper/TestDumper.xcodeproj/project.pbxproj +27 -5
- data/TestDumper/TestDumper.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- data/TestDumper/TestDumper.xcodeproj/xcshareddata/xcschemes/TestDumper.xcscheme +1 -1
- data/TestDumper/TestDumper/Initialize.m +83 -44
- data/bin/xcknife +2 -0
- data/bin/xcknife-min +12 -15
- data/bin/xcknife-test-dumper +2 -0
- data/example/run_example.rb +10 -8
- data/example/xcknife-exemplar-historical-data.json-stream +3 -3
- data/example/xcknife-exemplar.json-stream +3 -3
- data/lib/xcknife.rb +3 -1
- data/lib/xcknife/events_analyzer.rb +11 -6
- data/lib/xcknife/exceptions.rb +6 -2
- data/lib/xcknife/json_stream_parser_helper.rb +8 -8
- data/lib/xcknife/runner.rb +18 -19
- data/lib/xcknife/stream_parser.rb +84 -37
- data/lib/xcknife/test_dumper.rb +283 -112
- data/lib/xcknife/xcscheme_analyzer.rb +9 -9
- data/lib/xcknife/xctool_cmd_helper.rb +28 -4
- data/xcknife.gemspec +8 -9
- metadata +15 -12
- data/.gitmodules +0 -3
- data/.travis.yml +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 365fe40eceedeaed44f3287b13d9e8187fed76bcb50889234048434a5780aa11
|
4
|
+
data.tar.gz: 9b9bb9181a6547d4a288835e866a617a01ff4c3472eb9ba1ee4520ecb3e1804a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2657f17daeea0ebb7f84556f7531f8465fdca6ac5c60431ee34bfa816158e4e96bc2db7886091bf3c7959651950c23082835543271601ca9a61acb069d1349d
|
7
|
+
data.tar.gz: 342e20d4bef7ffef984dc97180de79beb85f5addadd316472dcb2cc7400d96a8eca0f6526525671fc9b6d853d4330df50d753fff290dcd1c2cb582152c88c42d
|
@@ -0,0 +1,24 @@
|
|
1
|
+
name: Tests
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
push:
|
6
|
+
branches:
|
7
|
+
- master
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
integration_tests:
|
11
|
+
name: Build and Test
|
12
|
+
runs-on: macos-latest
|
13
|
+
steps:
|
14
|
+
- uses: actions/checkout@v1
|
15
|
+
- name: Select Xcode 11.6
|
16
|
+
run: sudo xcode-select -s /Applications/Xcode_11.6.app
|
17
|
+
- uses: ruby/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: "2.6" # Version range or exact version of a Ruby version to use, using semvers version range syntax.
|
20
|
+
bundler-cache: true
|
21
|
+
- name: Installing GNU coreutils
|
22
|
+
run: brew install coreutils
|
23
|
+
- name: Build and Test
|
24
|
+
run: bundle exec rake build_test_dumper spec
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
@@ -0,0 +1,168 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.6
|
3
|
+
|
4
|
+
Layout/LineLength:
|
5
|
+
Max: 200
|
6
|
+
|
7
|
+
Style/Encoding:
|
8
|
+
Enabled: false
|
9
|
+
|
10
|
+
Lint/AmbiguousBlockAssociation:
|
11
|
+
Exclude:
|
12
|
+
- "spec/**/*"
|
13
|
+
|
14
|
+
Metrics/AbcSize:
|
15
|
+
Enabled: false
|
16
|
+
|
17
|
+
Metrics/MethodLength:
|
18
|
+
Enabled: false
|
19
|
+
|
20
|
+
Metrics/ClassLength:
|
21
|
+
Enabled: false
|
22
|
+
|
23
|
+
Metrics/ModuleLength:
|
24
|
+
Enabled: false
|
25
|
+
|
26
|
+
Metrics/BlockLength:
|
27
|
+
Max: 30
|
28
|
+
Exclude:
|
29
|
+
- "spec/**/*.rb"
|
30
|
+
|
31
|
+
Metrics/PerceivedComplexity:
|
32
|
+
Enabled: false
|
33
|
+
|
34
|
+
Style/SignalException:
|
35
|
+
Enabled: false
|
36
|
+
|
37
|
+
Style/StringLiterals:
|
38
|
+
EnforcedStyle: single_quotes
|
39
|
+
|
40
|
+
Style/TrivialAccessors:
|
41
|
+
ExactNameMatch: true
|
42
|
+
|
43
|
+
Style/RedundantReturn:
|
44
|
+
AllowMultipleReturnValues: true
|
45
|
+
|
46
|
+
# `module_function` is not equivalent as `extend self`
|
47
|
+
Style/ModuleFunction:
|
48
|
+
Enabled: false
|
49
|
+
|
50
|
+
Style/ClassAndModuleChildren:
|
51
|
+
Enabled: false
|
52
|
+
|
53
|
+
Style/Documentation:
|
54
|
+
Enabled: false
|
55
|
+
|
56
|
+
Layout/ClosingHeredocIndentation:
|
57
|
+
Enabled: false
|
58
|
+
|
59
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
60
|
+
Enabled: true
|
61
|
+
|
62
|
+
Layout/SpaceAroundMethodCallOperator:
|
63
|
+
Enabled: true
|
64
|
+
|
65
|
+
Lint/DeprecatedOpenSSLConstant:
|
66
|
+
Enabled: true
|
67
|
+
|
68
|
+
Lint/DuplicateElsifCondition:
|
69
|
+
Enabled: true
|
70
|
+
|
71
|
+
Lint/MixedRegexpCaptureTypes:
|
72
|
+
Enabled: true
|
73
|
+
|
74
|
+
Lint/RaiseException:
|
75
|
+
Enabled: true
|
76
|
+
|
77
|
+
Lint/StructNewOverride:
|
78
|
+
Enabled: true
|
79
|
+
|
80
|
+
Style/AccessorGrouping:
|
81
|
+
Enabled: true
|
82
|
+
|
83
|
+
Style/ArrayCoercion:
|
84
|
+
Enabled: true
|
85
|
+
|
86
|
+
Style/BisectedAttrAccessor:
|
87
|
+
Enabled: true
|
88
|
+
|
89
|
+
Style/CaseLikeIf:
|
90
|
+
Enabled: true
|
91
|
+
|
92
|
+
Style/ExponentialNotation:
|
93
|
+
Enabled: true
|
94
|
+
|
95
|
+
Style/HashAsLastArrayItem:
|
96
|
+
Enabled: true
|
97
|
+
|
98
|
+
Style/HashEachMethods:
|
99
|
+
Enabled: true
|
100
|
+
|
101
|
+
Style/HashLikeCase:
|
102
|
+
Enabled: true
|
103
|
+
|
104
|
+
Style/HashTransformKeys:
|
105
|
+
Enabled: true
|
106
|
+
|
107
|
+
Style/HashTransformValues:
|
108
|
+
Enabled: true
|
109
|
+
|
110
|
+
Style/RedundantAssignment:
|
111
|
+
Enabled: true
|
112
|
+
|
113
|
+
Style/RedundantFetchBlock:
|
114
|
+
Enabled: true
|
115
|
+
|
116
|
+
Style/RedundantFileExtensionInRequire:
|
117
|
+
Enabled: true
|
118
|
+
|
119
|
+
Style/RedundantRegexpCharacterClass:
|
120
|
+
Enabled: true
|
121
|
+
|
122
|
+
Style/RedundantRegexpEscape:
|
123
|
+
Enabled: true
|
124
|
+
|
125
|
+
Style/SlicingWithRange:
|
126
|
+
Enabled: true
|
127
|
+
|
128
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
129
|
+
Enabled: true
|
130
|
+
|
131
|
+
Lint/DuplicateRescueException:
|
132
|
+
Enabled: true
|
133
|
+
|
134
|
+
Lint/EmptyConditionalBody:
|
135
|
+
Enabled: true
|
136
|
+
|
137
|
+
Lint/FloatComparison:
|
138
|
+
Enabled: true
|
139
|
+
|
140
|
+
Lint/MissingSuper:
|
141
|
+
Enabled: true
|
142
|
+
|
143
|
+
Lint/OutOfRangeRegexpRef:
|
144
|
+
Enabled: true
|
145
|
+
|
146
|
+
Lint/SelfAssignment:
|
147
|
+
Enabled: true
|
148
|
+
|
149
|
+
Lint/TopLevelReturnWithArgument:
|
150
|
+
Enabled: true
|
151
|
+
|
152
|
+
Lint/UnreachableLoop:
|
153
|
+
Enabled: true
|
154
|
+
|
155
|
+
Style/ExplicitBlockArgument:
|
156
|
+
Enabled: true
|
157
|
+
|
158
|
+
Style/GlobalStdStream:
|
159
|
+
Enabled: true
|
160
|
+
|
161
|
+
Style/OptionalBooleanParameter:
|
162
|
+
Enabled: true
|
163
|
+
|
164
|
+
Style/SingleArgumentDig:
|
165
|
+
Enabled: true
|
166
|
+
|
167
|
+
Style/StringConcatenation:
|
168
|
+
Enabled: true
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.6.1
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
CWD=$(pwd)
|
4
|
+
|
5
|
+
if [[ "$CWD" == *".vscode"* ]] ; then
|
6
|
+
cd ..
|
7
|
+
fi
|
8
|
+
|
9
|
+
RSPEC_PATH="$(command -v rspec)"
|
10
|
+
BUNDLE_PATH="$(command -v bundle | sed 's/bin/wrappers/')"
|
11
|
+
RDEBUG_PATH=$(cd ./ || exit 1; bundle show ruby-debug-ide)
|
12
|
+
|
13
|
+
if [ -z "$RSPEC_PATH" ] || [ -z "$BUNDLE_PATH" ] || [ -z "$RDEBUG_PATH" ]; then
|
14
|
+
echo "error: Missing required gem, please run 'bundle install'"
|
15
|
+
exit 1
|
16
|
+
fi
|
17
|
+
|
18
|
+
echo "Using configuration paths:"
|
19
|
+
echo "$RSPEC_PATH"
|
20
|
+
echo "$BUNDLE_PATH"
|
21
|
+
echo "$RDEBUG_PATH"
|
22
|
+
|
23
|
+
cat < "./.vscode/vscode_ruby.json.template" | sed "s|RSPEC_PATH|$RSPEC_PATH|g" | sed "s|BUNDLE_PATH|$BUNDLE_PATH|g" | sed "s|RDEBUG_PATH|$RDEBUG_PATH|g" > ./.vscode/launch.json
|
@@ -0,0 +1,44 @@
|
|
1
|
+
{
|
2
|
+
"version": "0.2.0",
|
3
|
+
"configurations": [
|
4
|
+
{
|
5
|
+
"name": "Run RSpec - all",
|
6
|
+
"type": "Ruby",
|
7
|
+
"request": "launch",
|
8
|
+
"cwd": "${workspaceRoot}",
|
9
|
+
"useBundler": true,
|
10
|
+
"pathToBundler": "BUNDLE_PATH",
|
11
|
+
"program": "RSPEC_PATH",
|
12
|
+
"args": [
|
13
|
+
"--pattern",
|
14
|
+
"${workspaceRoot}/spec/**/*_spec.rb"
|
15
|
+
]
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"name": "Debug RSpec - open spec file",
|
19
|
+
"type": "Ruby",
|
20
|
+
"request": "launch",
|
21
|
+
"cwd": "${workspaceRoot}",
|
22
|
+
"useBundler": true,
|
23
|
+
"pathToBundler": "BUNDLE_PATH",
|
24
|
+
"pathToRDebugIDE": "RDEBUG_PATH",
|
25
|
+
"debuggerPort": "1235",
|
26
|
+
"program": "RSPEC_PATH",
|
27
|
+
"args": [
|
28
|
+
"${file}"
|
29
|
+
]
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"name": "Debug RSpec - open spec file & current line",
|
33
|
+
"type": "Ruby",
|
34
|
+
"request": "launch",
|
35
|
+
"cwd": "${workspaceRoot}",
|
36
|
+
"useBundler": true,
|
37
|
+
"pathToBundler": "BUNDLE_PATH",
|
38
|
+
"pathToRDebugIDE": "RDEBUG_PATH",
|
39
|
+
"debuggerPort": "1235",
|
40
|
+
"program": "RSPEC_PATH",
|
41
|
+
"args": ["${file}:${lineNumber}"]
|
42
|
+
}
|
43
|
+
]
|
44
|
+
}
|
data/Gemfile
CHANGED
@@ -1,8 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'https://rubygems.org'
|
2
4
|
|
3
5
|
group :development, :test do
|
4
|
-
gem 'rake', '~>
|
5
|
-
gem 'rspec', '~> 3.
|
6
|
+
gem 'rake', '~> 13.0.1'
|
7
|
+
gem 'rspec', '~> 3.9.0'
|
8
|
+
gem 'rubocop', '~> 0.88'
|
9
|
+
|
10
|
+
group :debug_vscode do
|
11
|
+
gem 'debase'
|
12
|
+
gem 'ruby-debug-ide', '~> 0.7.2'
|
13
|
+
end
|
6
14
|
end
|
7
15
|
|
8
16
|
gemspec
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
xcknife (0.13.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ast (2.4.1)
|
10
|
+
debase (0.2.4.1)
|
11
|
+
debase-ruby_core_source (>= 0.10.2)
|
12
|
+
debase-ruby_core_source (0.10.9)
|
13
|
+
diff-lcs (1.3)
|
14
|
+
parallel (1.19.2)
|
15
|
+
parser (2.7.1.4)
|
16
|
+
ast (~> 2.4.1)
|
17
|
+
rainbow (3.0.0)
|
18
|
+
rake (13.0.1)
|
19
|
+
regexp_parser (1.7.1)
|
20
|
+
rexml (3.2.4)
|
21
|
+
rspec (3.9.0)
|
22
|
+
rspec-core (~> 3.9.0)
|
23
|
+
rspec-expectations (~> 3.9.0)
|
24
|
+
rspec-mocks (~> 3.9.0)
|
25
|
+
rspec-core (3.9.2)
|
26
|
+
rspec-support (~> 3.9.3)
|
27
|
+
rspec-expectations (3.9.2)
|
28
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
29
|
+
rspec-support (~> 3.9.0)
|
30
|
+
rspec-mocks (3.9.1)
|
31
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
32
|
+
rspec-support (~> 3.9.0)
|
33
|
+
rspec-support (3.9.3)
|
34
|
+
rubocop (0.89.1)
|
35
|
+
parallel (~> 1.10)
|
36
|
+
parser (>= 2.7.1.1)
|
37
|
+
rainbow (>= 2.2.2, < 4.0)
|
38
|
+
regexp_parser (>= 1.7)
|
39
|
+
rexml
|
40
|
+
rubocop-ast (>= 0.3.0, < 1.0)
|
41
|
+
ruby-progressbar (~> 1.7)
|
42
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
43
|
+
rubocop-ast (0.3.0)
|
44
|
+
parser (>= 2.7.1.4)
|
45
|
+
ruby-debug-ide (0.7.2)
|
46
|
+
rake (>= 0.8.1)
|
47
|
+
ruby-progressbar (1.10.1)
|
48
|
+
unicode-display_width (1.7.0)
|
49
|
+
|
50
|
+
PLATFORMS
|
51
|
+
ruby
|
52
|
+
|
53
|
+
DEPENDENCIES
|
54
|
+
bundler (~> 1.12)
|
55
|
+
debase
|
56
|
+
rake (~> 13.0.1)
|
57
|
+
rspec (~> 3.9.0)
|
58
|
+
rubocop (~> 0.88)
|
59
|
+
ruby-debug-ide (~> 0.7.2)
|
60
|
+
xcknife!
|
61
|
+
|
62
|
+
BUNDLED WITH
|
63
|
+
1.17.3
|
data/OWNERS.yml
ADDED
data/README.md
CHANGED
@@ -9,7 +9,7 @@ It works by leveraging [xctool's](https://github.com/facebook/xctool) [json-stre
|
|
9
9
|
|
10
10
|
XCKnife generates a list of only arguments meant to be pass to Xctool's [*-only* test arguments](https://github.com/facebook/xctool#testing), but alternatively could used to generate multiple xcschemes with the proper test partitions.
|
11
11
|
|
12
|
-
More information on XCKnife, go [here](https://
|
12
|
+
More information on XCKnife, go [here](https://developer.squareup.com/blog/xcknife-faster-distributed-tests-for-ios).
|
13
13
|
|
14
14
|
## Install
|
15
15
|
|
@@ -194,6 +194,14 @@ XCKnife uses only a few attributes of a json-stream file. If you are storing the
|
|
194
194
|
|
195
195
|
`$ xcknife-min example/xcknife-exemplar-historical-data.json-stream minified.json-stream`
|
196
196
|
|
197
|
+
## Dependencies
|
198
|
+
|
199
|
+
XCKnife requires the use of the `gtimeout` command, which is provided in the GNU coreutils brew package. If you don't already have them, they can be installed with the command:
|
200
|
+
|
201
|
+
```
|
202
|
+
brew install coreutils
|
203
|
+
```
|
204
|
+
|
197
205
|
## Contributing
|
198
206
|
|
199
207
|
Any contributors to the master *xcknife* repository must sign the
|
data/Rakefile
CHANGED
@@ -1,22 +1,27 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
3
|
require 'fileutils'
|
4
|
+
require 'bundler/gem_tasks'
|
4
5
|
|
6
|
+
require 'rspec/core/rake_task'
|
5
7
|
RSpec::Core::RakeTask.new(:spec)
|
6
8
|
|
7
|
-
|
9
|
+
require 'rubocop/rake_task'
|
10
|
+
RuboCop::RakeTask.new
|
8
11
|
|
9
|
-
|
12
|
+
task default: %w[spec rubocop]
|
13
|
+
|
14
|
+
desc 'Builds TestDumper.dylib'
|
10
15
|
task :build_test_dumper do
|
11
|
-
target_dir = File.join(File.dirname(__FILE__),
|
16
|
+
target_dir = File.join(File.dirname(__FILE__), 'TestDumper')
|
12
17
|
Dir.chdir(target_dir) do
|
13
|
-
system
|
14
|
-
FileUtils.copy_file(
|
15
|
-
puts
|
18
|
+
system './build.sh'
|
19
|
+
FileUtils.copy_file('./testdumperbuild/Build/Products/Debug-iphonesimulator/TestDumper.framework/TestDumper', './TestDumper.dylib')
|
20
|
+
puts 'TestDumper.dylib was created successfully'
|
16
21
|
end
|
17
22
|
end
|
18
23
|
|
19
|
-
desc
|
20
|
-
task :
|
24
|
+
desc 'Release wih test_dumper'
|
25
|
+
task gem_release: %i[build_test_dumper build] do
|
21
26
|
system 'gem push pkg/xcknife-*.gem'
|
22
|
-
end
|
27
|
+
end
|