Skip to content

Multithreading tests and diagnostics #15

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

Merged

Conversation

sjavora
Copy link
Contributor

@sjavora sjavora commented Oct 14, 2019

Addresses this FIXME. Also adds tests for the // Multithreading extension.

@sjavora sjavora force-pushed the multithreading-tests-and-diagnostics branch from 19cfbba to 160cf99 Compare October 16, 2019 16:42
@DougGregor
Copy link
Member

@swift-ci please test

@sjavora
Copy link
Contributor Author

sjavora commented Oct 16, 2019

/home/buildnode/jenkins/workspace/pr-swift-driver-linux/branch-master/swift-driver/Tests/SwiftDriverTests/SwiftDriverTests.swift:169: error: SwiftDriverTests.testMultithreading : XCTAssertEqual threw error "unableToFind(tool: "clang")" -

Not sure what's going on here - the tests don't do anything special 🤔

@DougGregor
Copy link
Member

Hmm. Perhaps you need to add an explicit -target to your Driver invocations, e.g., as in nhttps://github.com/apple/swift-driver/blob/master/Tests/SwiftDriverTests/SwiftDriverTests.swift#L232

@DougGregor
Copy link
Member

We might have some configuration issues with finding clang on Linux consistently. @harlanhaskins do you know of any problems here?

@harlanhaskins
Copy link
Contributor

harlanhaskins commented Oct 16, 2019

Every time I've run it on Linux, clang has been in my PATH. Is it not in the PATH on the bots?

Also, we really need to figure out toolchain-relative lookups 😕

@DougGregor
Copy link
Member

Every time I've run it on Linux, clang has been in my PATH. Is it not in the PATH on the bots?

Also, we really need to figure out toolchain-relative lookups :/

Yes, definitely.

@sjavora
Copy link
Contributor Author

sjavora commented Oct 16, 2019

https://github.com/apple/swift-driver/blob/master/Tests/SwiftDriverTests/SwiftDriverTests.swift#L232

@DougGregor so this should work? I only have access to a Mac at the moment so I can't really test this. Also, the test failed only on the last assert - should I add the target only there or to all the invocations?

@sjavora
Copy link
Contributor Author

sjavora commented Oct 17, 2019

Added the target argument to the one failing assert for now.

@DougGregor
Copy link
Member

@swift-ci please test

@DougGregor
Copy link
Member

@swift-ci test

…o make it pass on Linux. Fixed inconsistent indentation.
@sjavora
Copy link
Contributor Author

sjavora commented Oct 18, 2019

@DougGregor now it failed on the other test - added target there as well, hopefully this will finally pass. I'm sorry about all the hassle for such small changes 😞

@DougGregor
Copy link
Member

@swift-ci please test

1 similar comment
@DougGregor
Copy link
Member

@swift-ci please test

@DougGregor
Copy link
Member

No worries; we need to figure out how best to find tools within our toolchain so these tests will become target-agnostic, but that's a separate issue.

@DougGregor DougGregor merged commit c393e30 into swiftlang:master Oct 18, 2019
fengjixuchui referenced this pull request in fengjixuchui/swift-driver Oct 18, 2019
Merge pull request apple#15 from sjavora/multithreading-tests-and-dia…
@sjavora sjavora deleted the multithreading-tests-and-diagnostics branch October 18, 2019 19:59
@sjavora
Copy link
Contributor Author

sjavora commented Oct 18, 2019

@DougGregor thanks! Should I open a PR to make some other diagnostics internal? If so, which ones?

Better yet, is there a place to discuss this project on the Swift forums? https://forums.swift.org/c/development/tooling?

@DougGregor
Copy link
Member

Yes, I think I'd like to make all of the diagnostics internal. For discussions, I recommend https://forums.swift.org/c/development/compiler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants