Skip to content

Add Dispatch overlay to test configuration #169

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
merged 1 commit into from
Aug 23, 2016

Conversation

seabaylea
Copy link
Contributor

When merging the NSURLSession code into Foundation, we hit the following issue in building the XCTest tests:

1.  While type-checking declaration 0x58c5ed8 at /home/baileyc/swift-corelibs-xctest/Tests/Functional/ListTests/main.swift:30:5
2.  While type-checking expression at [/home/baileyc/swift-corelibs-xctest/Tests/Functional/ListTests/main.swift:30:24 - line:30:128] RangeText="try! JSONSerialization.jsonObject(with: Data(contentsOf: URL(fileURLWithPath: CommandLine.arguments[2])))"
3.  While loading members for declaration 0x5d052d0 at <invalid loc>
4.  While deserializing 'init' (ConstructorDecl #11177) 
5.  While deserializing decl #27528 (PARAM_DECL)
6.  While deserializing decl #34459 (XREF)
7.  Cross-reference to module 'Dispatch'
    ... DispatchData

This is caused because the new Swift 3.0 overly isn't available to the XCTest tests at build/test time.

This PR adds the location for the build-time Dispatch overlay into the include path.

@modocache
Copy link
Contributor

Cool, looks good to me!

We've been seeing some Linux CI failures in swift-corelibs-foundation; see #166 for details. Since the Foundation tests run before the XCTest ones, we may not be able to get any information from this CI job. I'll test locally as well.

@swift-ci please test

"LIBDISPATCH_OVERLAY_DIR={libdispatch_overlay_dir}".format(
libdispatch_src_dir=os.path.abspath(args.libdispatch_src_dir),
libdispatch_build_dir=os.path.join(args.libdispatch_build_dir, 'src', '.libs'),
libdispatch_overlay_dir=os.path.join(args.libdispatch_build_dir, 'src', 'swift')))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps for a future commit: I think it's strange to have build-script.py take a --libdispatch-build-dir argument, then append src/.libs to that argument when setting the LIBDISPATCH_BUILD_DIR environment variable. Should the --libdispatch-build-dir argument be renamed?

@modocache
Copy link
Contributor

I ran this locally and confirmed:

  1. This patch works on Ubuntu 15.
  2. The crash in the Foundation tests that @briancroom mentions in Add @discardableResult annotation to applicable public API methods. #166 occurs on my machine as well.

I'll merge once the OS X CI job passes.

@modocache
Copy link
Contributor

OS X build passed, so I'm going to go ahead and merge this. Thanks for chiming in on the Foundation failures discussed in #166, @seabaylea! 🙇

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.

2 participants