xcknife 0.12.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/tests.yml +24 -0
- data/Gemfile.lock +1 -1
- data/Rakefile +1 -0
- data/lib/xcknife.rb +1 -1
- data/lib/xcknife/stream_parser.rb +9 -5
- data/lib/xcknife/test_dumper.rb +2 -2
- metadata +4 -4
- data/.travis.yml +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
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/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
data/lib/xcknife.rb
CHANGED
@@ -12,13 +12,14 @@ module XCKnife
|
|
12
12
|
|
13
13
|
attr_reader :number_of_shards, :test_partitions, :stats, :relevant_partitions
|
14
14
|
|
15
|
-
def initialize(number_of_shards, test_partitions, options_for_metapartition: Array.new(test_partitions.size, {}), allow_fewer_shards: false)
|
15
|
+
def initialize(number_of_shards, test_partitions, options_for_metapartition: Array.new(test_partitions.size, {}), allow_fewer_shards: false, on_extrapolation: nil)
|
16
16
|
@number_of_shards = number_of_shards
|
17
17
|
@test_partitions = test_partitions.map(&:to_set)
|
18
18
|
@relevant_partitions = test_partitions.flatten.to_set
|
19
19
|
@stats = ResultStats.new
|
20
20
|
@options_for_metapartition = options_for_metapartition.map { |o| Options::DEFAULT.merge(o) }
|
21
21
|
@allow_fewer_shards = allow_fewer_shards
|
22
|
+
@on_extrapolation = on_extrapolation
|
22
23
|
ResultStats.members.each { |k| @stats[k] = 0 }
|
23
24
|
end
|
24
25
|
|
@@ -224,15 +225,18 @@ module XCKnife
|
|
224
225
|
analyzer.target_class_map.each do |test_target, class_set|
|
225
226
|
if times_for_target_class.key?(test_target)
|
226
227
|
class_set.each do |clazz|
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
228
|
+
next if times_for_target_class[test_target].key?(clazz)
|
229
|
+
|
230
|
+
inc_stat :class_extrapolations
|
231
|
+
@on_extrapolation&.call(test_target: test_target, test_class: clazz)
|
232
|
+
times_for_target_class[test_target][clazz] = median_map[test_target]
|
231
233
|
end
|
232
234
|
else
|
233
235
|
inc_stat :target_extrapolations
|
236
|
+
@on_extrapolation&.call(test_target: test_target, test_class: nil)
|
234
237
|
class_set.each do |clazz|
|
235
238
|
inc_stat :class_extrapolations
|
239
|
+
@on_extrapolation&.call(test_target: test_target, test_class: clazz)
|
236
240
|
times_for_target_class[test_target][clazz] = extrapolated_duration(median_of_targets, class_set)
|
237
241
|
end
|
238
242
|
end
|
data/lib/xcknife/test_dumper.rb
CHANGED
@@ -454,8 +454,8 @@ module XCKnife
|
|
454
454
|
| # or swift instance method
|
455
455
|
_? # only present on Xcode 10.0 and below
|
456
456
|
(?:@objc\s)? # optional objc annotation
|
457
|
-
(?:[^.]+\.)? # module name
|
458
|
-
(
|
457
|
+
(?:[^. ]+\.)? # module name
|
458
|
+
([^ ]+) # class name
|
459
459
|
\.(test.+)\s->\s\(\) # method signature
|
460
460
|
)
|
461
461
|
$/ox
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcknife
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Ribeiro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -37,11 +37,11 @@ executables:
|
|
37
37
|
extensions: []
|
38
38
|
extra_rdoc_files: []
|
39
39
|
files:
|
40
|
+
- ".github/workflows/tests.yml"
|
40
41
|
- ".gitignore"
|
41
42
|
- ".rspec"
|
42
43
|
- ".rubocop.yml"
|
43
44
|
- ".ruby-version"
|
44
|
-
- ".travis.yml"
|
45
45
|
- ".vscode/configure.sh"
|
46
46
|
- ".vscode/vscode_ruby.json.template"
|
47
47
|
- CONTRIBUTING.md
|
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
98
|
requirements: []
|
99
|
-
rubygems_version: 3.0.
|
99
|
+
rubygems_version: 3.0.1
|
100
100
|
signing_key:
|
101
101
|
specification_version: 4
|
102
102
|
summary: Simple tool for optimizing XCTest runs across machines
|
data/.travis.yml
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
language: objective-c
|
2
|
-
sudo: false
|
3
|
-
matrix:
|
4
|
-
include:
|
5
|
-
- os: osx
|
6
|
-
osx_image: xcode11.6
|
7
|
-
|
8
|
-
before_script:
|
9
|
-
- export LANG=en_US.UTF-8
|
10
|
-
install: bundle
|
11
|
-
script:
|
12
|
-
- csrutil status
|
13
|
-
- git submodule update --init --recursive
|
14
|
-
- bundle exec rake build_test_dumper spec
|