forked from fastlane/fastlane
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix trainer failure result handling with objective C tests
When trainer is parsing an xcresult bundle which contains test failures, it has an `ActionTestMetadata` object that is identified one way (by "identifier") and it's trying to find the corresponding `TestFailureIssueSummary` object that's identified another way (by `testCaseName`). These values are not the same, so in order to locate the correct `TestFailureIssueSummary` object it needs to transform the `testCaseName` in the same way that Xcode does when generating the `ActionTestMetadata` identifier. Exactly how to do this is undocumented, so folks have attempted to figure it out empirically. Most recently, dda4007 ([trainer] fix issues where number of failures would always be zero (fastlane#21432), 2024-01-10) changed this transformation code in a way that fixed test names that contain spaces, but broke Objective-C test names. This commit fixes the regression caused by dda4007 with ObjC tests as follows: 1) It reverts the transformation behavior to how the code worked previously. Instead of "sanitizing" both the identifier and the test case name, it now keeps the identifier as is and "normalizes" the test case name. The test case name normalization has been moved into its own method which passes unit tests for ObjC, Swift, and tests with spaces. 2) It adds an ObjC xcresult bundle and unit test to prevent regressing parsing ObjC test names. 3) It refactors summaries_to_data so that if the corresponding test failure message cannot be located (but hopefully that won't happen anymore), we at least properly report that the test failed, but use the generic "unknown failure message" as the failure message. See discussion on: - fastlane#21565 - fastlane#21432
- Loading branch information
1 parent
df12128
commit b3848ec
Showing
8 changed files
with
99 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+2.3 KB
...~QcTkA55UPcxEP1nO1AY1osK3wJ6ccJbYiM6K7BJmWZ0MFG5UOgWiKPIxZQdQeP-BtGoBEwiEcoYSkz_QqfjjMA==
Binary file not shown.
Binary file added
BIN
+924 Bytes
...~X7J2zgrHmeOeXrqjN4i9NpJunCOzuFwvG8Jap1VZxvIbhWezMh3vFXEmz1umKNEzvzPaQgZfSqBlgcgIowxQdg==
Binary file not shown.
Binary file added
BIN
+397 Bytes
...~QcTkA55UPcxEP1nO1AY1osK3wJ6ccJbYiM6K7BJmWZ0MFG5UOgWiKPIxZQdQeP-BtGoBEwiEcoYSkz_QqfjjMA==
Binary file not shown.
Binary file added
BIN
+67 Bytes
...~X7J2zgrHmeOeXrqjN4i9NpJunCOzuFwvG8Jap1VZxvIbhWezMh3vFXEmz1umKNEzvzPaQgZfSqBlgcgIowxQdg==
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>dateCreated</key> | ||
<date>2024-04-23T23:38:03Z</date> | ||
<key>externalLocations</key> | ||
<array/> | ||
<key>rootId</key> | ||
<dict> | ||
<key>hash</key> | ||
<string>0~QcTkA55UPcxEP1nO1AY1osK3wJ6ccJbYiM6K7BJmWZ0MFG5UOgWiKPIxZQdQeP-BtGoBEwiEcoYSkz_QqfjjMA==</string> | ||
</dict> | ||
<key>storage</key> | ||
<dict> | ||
<key>backend</key> | ||
<string>fileBacked2</string> | ||
<key>compression</key> | ||
<string>standard</string> | ||
</dict> | ||
<key>version</key> | ||
<dict> | ||
<key>major</key> | ||
<integer>3</integer> | ||
<key>minor</key> | ||
<integer>39</integer> | ||
</dict> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters