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

Tests: Use a local cache for many tests importing AppKit #78530

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xymus
Copy link
Contributor

@xymus xymus commented Jan 9, 2025

Tests importing AppKit have a tendency to be flaky when they share a module cache with other builds using a different set of framework search flags. Make sure they use a local cache, otherwise the compiler can reuse incompatible cached modules.

Alternatively, we could align all builds using the same cache to have exactly the same framework search paths or enable explicit module builds. I picked the module cache as it's the most reliable solution in the short and long term.

The 5 tests below import AppKit and have been known to be flaky. Adapting them to use a custom cache with require more care. For now, let's use them as control group to validate that the fix works. If these 5 fail without the fixed ones, we should extend the same corresponding fix to them.

  • Interpreter/SDK/GLKit.swift
  • Interpreter/SDK/cf_extensions.swift
  • Interpreter/SDK/cf_type_bridging.swift
  • Interpreter/SDK/mapkit_header_static.swift
  • Interpreter/SDK/objc_ns_enum.swift

rdar://142296731

Tests importing AppKit have a tendency to be flaky if they share a
module cache with other builds using a different set of framework search
flags. Make sure they use a local cache to avoid picking incompatible
cached modules.

Alternatively, we could align all builds using the same cache to have
exactly the same framework search paths or enable explicit module
builds. I picked the module cache as it's the most reliable solution in
the short and long term.

The 5 tests below import AppKit and have been known to be flaky.
Adapting them to use a custom cache with require more care. For now,
let's use them as control group to validate that the fix works. If these
5 fail without the fixed ones, we should extend the same corresponding
fix to them.

- Interpreter/SDK/GLKit.swift
- Interpreter/SDK/cf_extensions.swift
- Interpreter/SDK/cf_type_bridging.swift
- Interpreter/SDK/mapkit_header_static.swift
- Interpreter/SDK/objc_ns_enum.swift

rdar://142296731
@xymus xymus requested a review from etcwilde January 9, 2025 20:28
@xymus xymus requested review from a team and nkcsgexi as code owners January 9, 2025 20:28
@xymus
Copy link
Contributor Author

xymus commented Jan 9, 2025

@swift-ci Please smoke test

@xymus xymus requested a review from artemcm January 9, 2025 21:50
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.

1 participant