Swift: Special case the xcode-fails-spm-works test results on macOS 26

macOS 26 comes with Xcode 26, which does not call the compiler on the file
with the `#error` diagnostic directive.
This commit is contained in:
Jeroen Ketema
2025-10-21 16:29:57 +02:00
parent 79fd35a482
commit 2843761471
2 changed files with 5 additions and 1 deletions

View File

@@ -0,0 +1,3 @@
| Package.swift:0:0:0:0 | Package.swift |
| Sources/hello-world/hello_world.swift:0:0:0:0 | Sources/hello-world/hello_world.swift |
| file://:0:0:0:0 | |

View File

@@ -3,6 +3,7 @@ import pytest
@runs_on.macos
@pytest.mark.ql_test("DB-CHECK", xfail=True)
@pytest.mark.ql_test("DB-CHECK", xfail=not runs_on.macos_26)
@pytest.mark.ql_test("*", expected=f"{'.macos_26' if runs_on.macos_26 else ''}.expected")
def test(codeql, swift):
codeql.database.create()