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-2244] swift test on Linux appears to be broken... #5413

Closed
swift-ci opened this issue Aug 1, 2016 · 3 comments
Closed

[SR-2244] swift test on Linux appears to be broken... #5413

swift-ci opened this issue Aug 1, 2016 · 3 comments
Labels

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Aug 1, 2016

Previous ID SR-2244
Radar None
Original Reporter babt (JIRA User)
Type Bug
Status Resolved
Resolution Done
Environment

swift-DEVELOPMENT-SNAPSHOT-2016-07-29-a-ubuntu15.10

Additional Detail from JIRA
Votes 0
Component/s Package Manager, XCTest
Labels Bug
Assignee babt (JIRA)
Priority Medium

md5: a194e5b31d8d8de5afe0acc9f0960554

Issue Description:

babt@Swift-TestVM:~/$ mkdir NewTest
babt@Swift-TestVM:~/$ cd NewTest
babt@Swift-TestVM:~/NewTest$ swift package init --type library
Creating library package: NewTest
Creating Package.swift
Creating .gitignore
Creating Sources/
Creating Sources/NewTest.swift
Creating Tests/
Creating Tests/LinuxMain.swift
Creating Tests/NewTestTests/
Creating Tests/NewTestTests/NewTestTests.swift
babt@Swift-TestVM:~/NewTest$ pg Tests/LinuxMain.swift 
import XCTest
@testable import NewTestTests

XCTMain([
     testCase(NewTestTests.allTests),
])
babt@Swift-TestVM:~/NewTest$ pg Tests/NewTestTests/NewTestTests.swift 
import XCTest
@testable import NewTest

class NewTestTests: XCTestCase {
    func testExample() {
        // This is an example of a functional test case.
        // Use XCTAssert and related functions to verify your tests produce the correct results.
        XCTAssertEqual(NewTest().text, "Hello, World!")
    }


    static var allTests : [(String, (NewTestTests) -> () throws -> Void)] {
        return [
            ("testExample", testExample),
        ]
    }
}
babt@Swift-TestVM:~/NewTest$ swift build                                                                            
Compile Swift Module 'NewTest' (1 sources)
babt@Swift-TestVM:~/NewTest$ swift test
Compile Swift Module 'NewTestTests' (1 sources)
Linking ./.build/debug/NewTestTests.xctest
/home/babt/NewTest/Tests/LinuxMain.swift:2:18: warning: file 'LinuxMain.swift' is part of module 'NewTestTests'; ignoring import
@testable import NewTestTests
                 ^
/home/babt/NewTest/Tests/LinuxMain.swift:5:15: error: module 'NewTestTests' has no member named 'allTests'
     testCase(NewTestTests.allTests),
              ^~~~~~~~~~~~ ~~~~~~~~
<unknown>:0: error: build had 1 command failures
error: exit(1): /home/babt/swift-DEVELOPMENT-SNAPSHOT-2016-07-29-a-ubuntu15.10/usr/bin/swift-build-tool -f /home/babt/NewTest/.build/debug.yaml test
babt@Swift-TestVM:~/NewTest$

I think this was broken when SE-0129 was implemented.

@swift-ci
Copy link
Contributor Author

swift-ci commented Aug 1, 2016

Comment by Bill Abt (JIRA)

Sorry for all the stupid edits. I forgot the formatting code. 🙂

@ankitspd
Copy link
Member

ankitspd commented Aug 2, 2016

PR #586

@ankitspd
Copy link
Member

ankitspd commented Aug 2, 2016

#586

@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
This issue was closed.
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