xctest_list 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xctest_list.rb +6 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d30d77f0b8ae324ef87fedfc67f4eb2a4318614e
|
4
|
+
data.tar.gz: 4c754fe3ac7b4c3b2b62b3c5f0e148e7d3d43ec6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b65b18f150b9508f29082310e64bb0562027551861cfbe5a8231bce5590e1c19183776f6ae03d2862491f5f24bd91dc841c89481b877e37cad8ab0676b9e7926
|
7
|
+
data.tar.gz: 6167a34071da94533cc0e225a9f2bce1a38ca537d67d0adb0d2b2175f1233df052abc013913a2f6c21bb88abd47ad95d1e0eccc3a9ec216822dd211e8d0c514c
|
data/lib/xctest_list.rb
CHANGED
@@ -31,18 +31,15 @@ class XCTestList
|
|
31
31
|
|
32
32
|
# find the Objective-C symbols in the bundle's binary
|
33
33
|
def self.objc_tests(xctest_bundle_path)
|
34
|
-
objc_symbols_cmd = 'nm -U '
|
35
|
-
objc_symbols_cmd << "'#{binary_path(xctest_bundle_path)}'"
|
36
|
-
|
37
34
|
tests = []
|
38
|
-
|
39
|
-
|
40
|
-
|
35
|
+
objc_symbols_command_output_tempfile = Tempfile.new(File.basename(xctest_bundle_path) + "objc")
|
36
|
+
system("nm -U '#{binary_path(xctest_bundle_path)}' > '#{objc_symbols_command_output_tempfile.path}'")
|
37
|
+
tests = []
|
38
|
+
File.open(objc_symbols_command_output_tempfile.path, 'r').each do |line|
|
41
39
|
if / t -\[(?<testclass>\w+) (?<testmethod>test\w+)\]/ =~ line
|
42
40
|
tests << "#{testclass}/#{testmethod}"
|
43
41
|
end
|
44
42
|
end
|
45
|
-
end
|
46
43
|
tests
|
47
44
|
end
|
48
45
|
|
@@ -53,11 +50,11 @@ class XCTestList
|
|
53
50
|
|
54
51
|
# find the Swift symbols in the bundle's binary
|
55
52
|
def self.swift_tests(xctest_bundle_path)
|
56
|
-
swift_symbols_command_output_tempfile = Tempfile.new(File.basename(xctest_bundle_path))
|
53
|
+
swift_symbols_command_output_tempfile = Tempfile.new(File.basename(xctest_bundle_path) + "swift")
|
57
54
|
system("nm -gU '#{binary_path(xctest_bundle_path)}' > '#{swift_symbols_command_output_tempfile.path}'")
|
58
55
|
tests = []
|
59
56
|
File.open(swift_symbols_command_output_tempfile.path, 'r').each do |line|
|
60
|
-
if /\w+\.(?<testclass>[^\.]+)\.(?<testmethod>test[^\(]+)/ =~ system("xcrun swift-demangle #{line}")
|
57
|
+
if /.*-\[.*\]/ !~ line && /\w+\.(?<testclass>[^\.]+)\.(?<testmethod>test[^\(]+)/ =~ system("xcrun swift-demangle #{line}")
|
61
58
|
tests << "#{testclass}/#{testmethod}"
|
62
59
|
end
|
63
60
|
end
|