Skip to content

Conversation

@d-ronnqvist
Copy link
Contributor

  • Rationale: The original modified a large number of unit tests. If this is different in main and release/5.6 it increases the chance that a commit from main that's cherry picked onto 5.6 has a conflict in the unit testing code.
  • Risk: Low.
  • Risk Detail: This is almost entirely a change in test code. Minor non-test code changes were made to allow unit tests to pass in custom unique temp directories to code that write temp data.
  • Reward: Low/Medium
  • Reward Details: Minimizes risk of conflicts when cherry picking other work onto the 5.6 release branch.
  • Original PR: Adapt tests to work better in Swift CI #45
  • Issue: rdar://85055022
  • Code Reviewed By: @franklinsch
  • Testing Details: This is almost entirely a change in test code.

* Add utility to create temp directories in unit tests

* Create new target for test utilities

* Pass the temporary directory to ConvertAction

* Re-enable one skipped test

* Update new tests to use `createTemporaryDirectory` helper

* Remove `createDirectoryForLastPathComponent` argument in test helper

* Update test helper documentation

* Prefer `FileManager.temporaryDirectory` property in ConvertAction

* Move `Files` and `Folder` types into test utility target

* Add additional safety checks when creating and removing temporary directories

* Replace `TempFolder` test class with `createTempFolder` test function

* Use XCTUnwrap instead of force unwrap in test helper

* Also shadow `FileManager.temporaryDirectory` in tests

* Add temp directory test helper variant with "named" argument

This is clearer at the call site when only a single path component is specified.

* Fix test helper syntax in disabled preview server test

* Re-enable one file monitoring test
@d-ronnqvist d-ronnqvist requested review from ethan-kusters and sara-radi and removed request for ethan-kusters January 11, 2022 20:37
@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

@d-ronnqvist d-ronnqvist merged commit bccbd87 into swiftlang:release/5.6 Jan 11, 2022
@d-ronnqvist d-ronnqvist deleted the ci-test-separation-5.6 branch January 11, 2022 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants