xcknife 0.6.2 → 0.6.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/TestDumper/TestDumper/Initialize.m +19 -3
- data/lib/xcknife.rb +1 -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: a16ad712fe21666c9ec13b16c1cc3007120bc9eb
|
4
|
+
data.tar.gz: fc3109c894275ca6c8e5fed344fd35a3a11d0457
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f364876c260015cc6b0729035c5835b295e1772b27671b50448064659841ab21e2384476b4e5860387e0f397db41d80f4fe48730b6e36879776295e18d89056d
|
7
|
+
data.tar.gz: 456da664e95295f2ae4a20982b245e7ade3a616047cf89dd654e0de0d5d053f2d1a11da6b9bc88b8f1099fd917111f7ed963a112b9c3c2cde6c50056a406a00d
|
@@ -114,17 +114,32 @@ static void PrintTestClass(FILE *outFile, NSString *testClass) {
|
|
114
114
|
@"totalDuration" : @"0"});
|
115
115
|
}
|
116
116
|
|
117
|
+
void enumerateTests();
|
118
|
+
|
117
119
|
const int TEST_TARGET_LEVEL = 0;
|
118
120
|
const int TEST_CLASS_LEVEL = 1;
|
119
121
|
const int TEST_METHOD_LEVEL = 2;
|
120
122
|
|
123
|
+
|
121
124
|
__attribute__((constructor))
|
122
125
|
void initialize() {
|
126
|
+
NSString *testType = [NSString stringWithUTF8String: getenv("XCTEST_TYPE")];
|
127
|
+
|
128
|
+
if ([testType isEqualToString: @"APPTEST"]) {
|
129
|
+
[[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidFinishLaunchingNotification object:nil queue:nil usingBlock:^(NSNotification * _Nonnull note) {
|
130
|
+
enumerateTests();
|
131
|
+
}];
|
132
|
+
} else {
|
133
|
+
enumerateTests();
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
|
138
|
+
void enumerateTests() {
|
123
139
|
XCTestConfiguration *config = [[XCTestConfiguration alloc] init];
|
124
140
|
NSString *testType = [NSString stringWithUTF8String: getenv("XCTEST_TYPE")];
|
125
141
|
NSString *testTarget = [NSString stringWithUTF8String: getenv("XCTEST_TARGET")];
|
126
142
|
|
127
|
-
|
128
143
|
if ([testType isEqualToString: @"APPTEST"]) {
|
129
144
|
config.testBundleURL = [NSURL fileURLWithPath:NSProcessInfo.processInfo.environment[@"XCInjectBundle"]];
|
130
145
|
config.targetApplicationPath = NSProcessInfo.processInfo.environment[@"XCInjectBundleInto"];
|
@@ -146,11 +161,11 @@ void initialize() {
|
|
146
161
|
|
147
162
|
FILE *outFile;
|
148
163
|
NSString *testDumperOutputPath = NSProcessInfo.processInfo.environment[@"TestDumperOutputPath"];
|
149
|
-
|
164
|
+
|
150
165
|
if (testDumperOutputPath == nil) {
|
151
166
|
outFile = stdout;
|
152
167
|
} else {
|
153
|
-
outFile =
|
168
|
+
outFile = fopen(testDumperOutputPath.UTF8String, "w+");
|
154
169
|
}
|
155
170
|
|
156
171
|
NSLog(@"Opened %@ with fd %p", testDumperOutputPath, outFile);
|
@@ -162,6 +177,7 @@ void initialize() {
|
|
162
177
|
exit(0);
|
163
178
|
}
|
164
179
|
|
180
|
+
|
165
181
|
// This test enumerates the Xctest classes and targets, in the json-stream format. We only enumerate the first test method,
|
166
182
|
// since xcknife does use test method level information (ref: https://github.com/square/xcknife)
|
167
183
|
@implementation XCTestSuite (DumpAdditions)
|
data/lib/xcknife.rb
CHANGED
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.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Ribeiro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|