Commit 6a4a3a9
authored
Create fallback event handler library for Swift Testing and XCTest interop (#1369)
This library will eventually be visible in the toolchain, and either
testing library (Swift Testing or XCTest) will be able to use it to pass
along unhandled issues to a test runner from the other framework,
enabling interoperability.
### Modifications:
No tests are included in this change because the interop library must
make it into the toolchain first before we can write tests against it.
Tests will be coming in the near future!
### Checklist:
- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.
- [x] Toolchain build succeeds
- [x] Expected symbols are visible in the toolchain build*
Ubuntu:
```
~/Downloads/usr ❯ nm lib/swift/linux/lib_TestingInterop.so | rg handler
• <stdin>
1:0000000000002140 b $s15_TestingInterop21_fallbackEventHandler33_AF82E98923290C49994CD1CA5A7BD647LL15Synchronization6AtomicVySVSgGvp
2:0000000000000b50 T $s15_TestingInterop38_swift_testing_getFallbackEventHandlerySPys4Int8VG_SVSiSVSgtYbXCSgyF
3:0000000000000b70 T $s15_TestingInterop42_swift_testing_installFallbackEventHandlerySbySPys4Int8VG_SVSiSVSgtYbXCF
57:0000000000000b40 T _swift_testing_getFallbackEventHandler
58:0000000000000b60 T _swift_testing_installFallbackEventHandler
```
macOS:
```
~/Downloads/Library ❯ nm Developer/Toolchains/swift-PR-84971-2110.xctoolchain/usr/lib/swift/macosx/testing/lib_TestingInterop.dylib | rg handler
• <stdin>
1:0000000000003bbc t _$s15_TestingInterop21_fallbackEventHandler33_AF82E98923290C49994CD1CA5A7BD647LL_WZ
2:0000000000008010 b _$s15_TestingInterop21_fallbackEventHandler33_AF82E98923290C49994CD1CA5A7BD647LL_Wz
3:0000000000008018 b _$s15_TestingInterop21_fallbackEventHandler33_AF82E98923290C49994CD1CA5A7BD647LLs13ManagedBufferCyySPys4Int8VG_SVSiSVSgtYbXCSgSo16os_unfair_lock_sVGvp
4:0000000000003c50 T _$s15_TestingInterop38_swift_testing_getFallbackEventHandlerySPys4Int8VG_SVSiSVSgtYbXCSgyF
5:0000000000003d24 T _$s15_TestingInterop42_swift_testing_installFallbackEventHandlerySbySPys4Int8VG_SVSiSVSgtYbXCF
46:0000000000003bf0 T __swift_testing_getFallbackEventHandler
47:0000000000003cb0 T __swift_testing_installFallbackEventHandler
```
*Windows does not have the interop lib yet since it requires changes to
https://github.com/swiftlang/swift-installer-scripts. This will be done
in a follow-up :)1 parent 38067d6 commit 6a4a3a9
File tree
3 files changed
+131
-0
lines changed- Sources
- _TestingInterop
3 files changed
+131
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
0 commit comments