Skip to content

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

Closed
@bkhouri

Description

@bkhouri

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

Metadata

Metadata

Assignees

Labels

test suiteimprovements to SwiftPM test suitewindows

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions