You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests: Use withTemporaryDirectory wrapper in body of testPackageInitExecutable
`testPackageInitExecutable` checks that the default Swift package generated
by `swift package init` can be built with each SDK under test. The packages
are already generated in temporary directories, so they do not suffer from the
deadlocking problem when run under `swift test`.
Currently each test run uses a directory with the same name in the
user's temporary directory. This means that the test has to remove
anything left behind by a previous run before starting a new on.
Using `withTemporaryDirectory` avoids this problem because it creates
a fresh temporary directory for each run and deletes it automatically
when the body closure returns.
0 commit comments