Skip to content

Commit e5261f8

Browse files
committed
Port Swift integration tests to pytest.
1 parent ef21ee5 commit e5261f8

File tree

24 files changed

+136
-246
lines changed

24 files changed

+136
-246
lines changed

swift/ql/integration-tests/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
py_library(
22
name = "utils",
33
srcs = [
4-
"create_database_utils.py",
54
"diagnostics_test_utils.py",
65
],
76
visibility = ["//swift:__subpackages__"],

swift/ql/integration-tests/create_database_utils.py

Lines changed: 0 additions & 41 deletions
This file was deleted.

swift/ql/integration-tests/legacy

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
from create_database_utils import *
1+
import runs_on
22

3-
run_codeql_database_create([
4-
"swiftc -enable-bare-slash-regex regex.swift -o /dev/null",
5-
], lang="swift")
3+
4+
@runs_on.linux
5+
def test(codeql, swift):
6+
codeql.database.create(command="swiftc -enable-bare-slash-regex regex.swift -o /dev/null")
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
from create_database_utils import *
2-
from diagnostics_test_utils import *
1+
import runs_on
32

4-
run_codeql_database_create([], lang='swift', keep_trap=True, db=None, runFunction=runUnsuccessfully)
5-
check_diagnostics()
3+
4+
@runs_on.linux
5+
def test(codeql, swift):
6+
codeql.database.create(_assert_failure=True)
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
from create_database_utils import *
2-
from diagnostics_test_utils import *
1+
import runs_on
32

4-
run_codeql_database_create([], lang='swift', keep_trap=True, db=None, runFunction=runUnsuccessfully)
5-
check_diagnostics()
3+
4+
@runs_on.macos
5+
def test(codeql, swift):
6+
codeql.database.create(_assert_failure=True)
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
from create_database_utils import *
2-
from diagnostics_test_utils import *
1+
import runs_on
32

4-
run_codeql_database_create([], lang='swift', keep_trap=True, db=None, runFunction=runUnsuccessfully)
5-
check_diagnostics()
3+
4+
@runs_on.macos
5+
def test(codeql, swift):
6+
codeql.database.create(_assert_failure=True)
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
from create_database_utils import *
2-
from diagnostics_test_utils import *
1+
import runs_on
32

4-
run_codeql_database_create([], lang='swift', keep_trap=True, db=None, runFunction=runUnsuccessfully)
5-
check_diagnostics()
3+
4+
@runs_on.macos
5+
def test(codeql, swift):
6+
codeql.database.create(_assert_failure=True)
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
from create_database_utils import *
2-
from diagnostics_test_utils import *
1+
import runs_on
32

4-
run_codeql_database_create([], lang='swift', keep_trap=True, db=None, runFunction=runUnsuccessfully)
5-
check_diagnostics()
3+
4+
@runs_on.macos
5+
def test(codeql, swift):
6+
codeql.database.create(_assert_failure=True)
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
from create_database_utils import *
2-
from diagnostics_test_utils import *
1+
import runs_on
32

4-
run_codeql_database_create([], lang='swift', keep_trap=True, db=None, runFunction=runUnsuccessfully)
5-
check_diagnostics()
3+
4+
@runs_on.macos
5+
def test(codeql, swift):
6+
codeql.database.create(_assert_failure=True)

0 commit comments

Comments
 (0)