Skip to content

Commit

Permalink
[Swift export] Avoid checking Kotlin bridges for external projects
Browse files Browse the repository at this point in the history
These tests tend to be extremely large which makes them hard to validate.
Let's keep only Swift + C part for now as they are the important ones.
  • Loading branch information
sbogolepov authored and Space Team committed Feb 13, 2025
1 parent 00d7d6e commit 81386cf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1,484 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ class ExternalProjectGenerationTests : AbstractKlibBasedSwiftRunnerTest() {
validateFullLibraryDump(klibSettings, "kotlinx-serialization-core")
}

private fun validateFullLibraryDump(klib: KlibExportSettings, goldenData: String) {
private fun validateFullLibraryDump(
klib: KlibExportSettings,
goldenData: String,
validateKotlinBridge: Boolean = false,
) {
val config = klib.createConfig(tmpdir.toPath().resolve(klib.swiftModuleName))
val inputModule = klib.createInputModule(config)
val result = runSwiftExport(setOf(inputModule)).getOrThrow()
validateSwiftExportOutput(testDataDir.resolve(goldenData), result)
validateSwiftExportOutput(testDataDir.resolve(goldenData), result, validateKotlinBridge)
}

}
Expand Down
Loading

0 comments on commit 81386cf

Please sign in to comment.