Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

missing LinuxMain.swift file

Tags:

swift

vapor

Running swift test with Swift 5.1 or later complains about missing LinuxMain.swift file.

$ swift test
error: missing LinuxMain.swift file in the Tests directory
like image 629
tanner0101 Avatar asked Nov 18 '25 05:11

tanner0101


1 Answers

When using Swift 5.1 or later, use the --enable-test-discovery flag to bypass LinuxMain.swift.

swift test --enable-test-discovery

More info here: https://forums.swift.org/t/test-discovery-on-linux/26203

like image 155
tanner0101 Avatar answered Nov 21 '25 02:11

tanner0101