LinuxMain.swift and Custom Target Layouts (SE-0162)


(Ankit Aggarwal) #1

Hi,

XCTest on linux doesn't support dynamic test discovery and requires the list of test cases in order to run them. The Package Manager allows declaring the test cases using `LinuxMain.swift` file. This file is expected to be found in Tests directory, but with custom target layouts feature, it is possible to relocate the test targets. To handle this, we want to expand the rule for finding `LinuxMain.swift`. The new rule will search for `LinuxMain.swift` adjacent to any test target, iterating upto the package root. It is an error to have multiple `LinuxMain.swift` files.

Thanks,
Ankit