Skip to content

Ensure attachments created in exit tests are forwarded to the parent. #1282

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Aug 21, 2025

This PR ensures that when an exit test records an attachment, it is forwarded to the parent process.

It introduces a local/private dependency on Data in EncodedAttachment so that we can use its base64 encoding/decoding and its ability to map files from disk. If Foundation is not available, it falls back to encoding/decoding [UInt8] and reading files into memory with fread() (the old-fashioned way).

Resolves rdar://149242118.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

This PR ensures that when an exit test records an attachment, it is forwarded to
the parent process.

It introduces a local/private dependency on `Data` in `EncodedAttachment` so
that we can use its base64 encoding/decoding and its ability to map files from
disk. If Foundation is not available, it falls back to encoding/decoding
`[UInt8]` and reading files into memory with `fread()` (the old-fashioned way).

Resolves rdar://149242118.
@grynspan grynspan added this to the Swift 6.x (main) milestone Aug 21, 2025
@grynspan grynspan self-assigned this Aug 21, 2025
@grynspan grynspan added bug 🪲 Something isn't working exit-tests ☠️ Work related to exit tests attachments/activities 🖇️ Work related to attachments and/or activities labels Aug 21, 2025
@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan
Copy link
Contributor Author

@swift-ci test Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
attachments/activities 🖇️ Work related to attachments and/or activities bug 🪲 Something isn't working exit-tests ☠️ Work related to exit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants