Skip to content

Reactivate libdispatch tests on Linux #27940

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 2 commits into from
Nov 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1020,16 +1020,16 @@ elif (run_os in ['linux-gnu', 'linux-gnueabihf', 'freebsd', 'windows-cygnus', 'w
config.target_runtime = "native"
config.target_swift_autolink_extract = inferSwiftBinary("swift-autolink-extract")

libdispatch_artifact_dir = make_path(config.libdispatch_build_path, 'src')
libdispatch_artifact_dir = config.libdispatch_build_path
libdispatch_swift_module_dir = make_path(libdispatch_artifact_dir, 'src', 'swift', 'swift')
Copy link
Contributor

Choose a reason for hiding this comment

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

This path seems…worse? Why the double nesting?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have no idea. I just built under docker/Linux and looked where things ended up.
See my comment above: #27940 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's worth fixing the path where things get built rather than adjusting the test logic to look there.

Copy link
Member

Choose a reason for hiding this comment

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

The "double" is because the swift overlay is in src/swift, and the swift modules/docs/interfaces are emitted into a swift directory.

libdispatch_artifacts = [
make_path(libdispatch_artifact_dir, 'libdispatch.so'),
make_path(libdispatch_artifact_dir, 'libswiftDispatch.so'),
make_path(libdispatch_artifact_dir, 'swift', 'Dispatch.swiftmodule')]
make_path(libdispatch_swift_module_dir, 'Dispatch.swiftmodule')]
if (all(os.path.exists(p) for p in libdispatch_artifacts)):
config.available_features.add('libdispatch')
config.libdispatch_artifact_dir = libdispatch_artifact_dir
libdispatch_source_dir = make_path(config.swift_src_root, os.pardir, 'swift-corelibs-libdispatch')
libdispatch_swift_module_dir = make_path(libdispatch_artifact_dir, 'swift')
config.import_libdispatch = ('-I %s -I %s -L %s'
% (libdispatch_source_dir, libdispatch_swift_module_dir, libdispatch_artifact_dir))

Expand Down