Skip to content

Commit

Permalink
Store test content in a custom metadata section.
Browse files Browse the repository at this point in the history
See also: swiftlang/swift#76698

Resolves #735.
  • Loading branch information
grynspan committed Oct 3, 2024
1 parent b439448 commit c96205d
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Documentation/ABI/TestContent.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,8 @@ the testing library are stored in dedicated platform-specific sections:

| Platform | Binary Format | Section Name |
|-|:-:|-|
| macOS | Mach-O | `__DATA_CONST,__swift5_tests` |
| iOS | Mach-O | `__DATA_CONST,__swift5_tests` |
| watchOS | Mach-O | `__DATA_CONST,__swift5_tests` |
| tvOS | Mach-O | `__DATA_CONST,__swift5_tests` |
| visionOS | Mach-O | `__DATA_CONST,__swift5_tests` |
| Linux | ELF | `PT_NOTE`[^1] |
| FreeBSD | ELF | `PT_NOTE`[^1] |
| Android | ELF | `PT_NOTE`[^1] |
| macOS, iOS, watchOS, tvOS, visionOS | Mach-O | `__DATA_CONST,__swift5_tests` |
| Linux, FreeBSD, Android | ELF | `PT_NOTE`[^1] |
| WASI | Statically Linked | `swift5_tests` |
| Windows | PE/COFF | `.sw5test` |

Expand Down Expand Up @@ -66,6 +60,11 @@ struct SWTTestContent {
};
```

This structure may grow in the future as needed. Check the `n_descsz` field of
the record header to determine if there are additional fields present. Do not
assume that the size of this structure will remain fixed over time or that all
discovered test content records are the same size.

#### The accessor field

The function `accessor` is a C function whose signature in Swift can be restated
Expand Down

0 comments on commit c96205d

Please sign in to comment.