Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-15500] CommandsTests.PackageToolTests/testArchiveSource fails #4375

Open
swift-ci opened this issue Nov 19, 2021 · 2 comments
Open

[SR-15500] CommandsTests.PackageToolTests/testArchiveSource fails #4375

swift-ci opened this issue Nov 19, 2021 · 2 comments
Labels

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-15500
Radar None
Original Reporter Beard (JIRA User)
Type Bug
Status In Progress
Resolution
Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug
Assignee Beard (JIRA)
Priority Medium

md5: af6421b155d3e907c8b176cda4886a0f

Issue Description:

If I build latest main branch of swift-package-manager, and run the following test using the built version of swift-test:

swift-test --filter CommandsTests.PackageToolTests/testArchiveSource 

it fails with this message:

swift-package-manager/Tests/CommandsTests/PackageToolTests.swift:1162: error: -[CommandsTests.PackageToolTests testArchiveSource] : XCTAssertTrue failed - actual: "error: Couldn’t create an archive:
     fatal: could not open '/' for writing: Is a directory
 "
@swift-ci
Copy link
Contributor Author

Comment by Patrick Beard (JIRA)

I discovered that this was caused by the version of git I'm using, installed via homebrew. Removing that fixes the issue. I suggest removing the second test since it seems to be git version sensitive:

diff --git a/Tests/CommandsTests/PackageToolTests.swift b/Tests/CommandsTests/PackageToolTests.swift
index 758f8da8..4218b029 100644
--- a/Tests/CommandsTests/PackageToolTests.swift
+++ b/Tests/CommandsTests/PackageToolTests.swift
@@ -1160,8 +1160,7 @@ final class PackageToolTests: CommandsTestCase {
 
                 let stderrOutput = try result.utf8stderrOutput()
                 XCTAssert(
-                    stderrOutput.contains("error: Couldn’t create an archive:") &&
-                        stderrOutput.contains("fatal: could not create archive file '/': Is a directory"),
+                    stderrOutput.contains("error: Couldn’t create an archive:"),
                     #"actual: "\#(stderrOutput)""#
                 )
             }

@swift-ci
Copy link
Contributor Author

Comment by Patrick Beard (JIRA)

Fixed in #3878.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants