Skip to content

Skip tests that require tar if the binary is not available on the path #8586

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

Closed
bkhouri opened this issue May 1, 2025 · 0 comments · Fixed by #8601
Closed

Skip tests that require tar if the binary is not available on the path #8586

bkhouri opened this issue May 1, 2025 · 0 comments · Fixed by #8601
Assignees
Labels
test suite improvements to SwiftPM test suite windows

Comments

@bkhouri
Copy link
Contributor

bkhouri commented May 1, 2025

In trying to enable execution of Swift PM test in the Windows pseudo toolchain build (swiftlang/swift#80405), some SwiftPM tests fail with the following:

<EXPR>:0: error: UniversalArchiverTests.testSuccess : threw error "missingExecutableProgram(program: "tar.exe")"

This is a result of tar.exe not being installed on the Windows host.

The test should be guarded with try XCTRequiresBinary("tar") (or equivalent) which would:

  • skip the test if the required binary is not accessible,
  • execute the test if the required binary is executable
@bkhouri bkhouri added test suite improvements to SwiftPM test suite windows labels May 1, 2025
@bkhouri bkhouri self-assigned this May 1, 2025
bkhouri added a commit to bkhouri/swift-package-manager that referenced this issue May 1, 2025
The Archiver tests has a dependency on a system binary being available
on the host.  Update the archiver test to skip the test is the required
executable is not available on the system.

Fixes: swiftlang#8586
Issue: rdar://150414402
bkhouri added a commit to bkhouri/swift-package-manager that referenced this issue May 1, 2025
The Archiver tests has a dependency on a system binary being available
on the host.  Update the archiver test to skip the test is the required
executable is not available on the system.

Fixes: swiftlang#8586
Issue: rdar://150414402
bkhouri added a commit to bkhouri/swift-package-manager that referenced this issue May 1, 2025
The Archiver tests has a dependency on a system binary being available
on the host.  Update the archiver test to skip the test is the required
executable is not available on the system.

Fixes: swiftlang#8586
Issue: rdar://150414402
@bkhouri bkhouri closed this as completed in c5582fb May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test suite improvements to SwiftPM test suite windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant