Skip to content

Commit 8b131ad

Browse files
authored
Merge pull request github#9283 from github/alexdenisov/swift-integration-tests
Swift: add integration tests
2 parents efda248 + fa09078 commit 8b131ad

File tree

7 files changed

+50
-0
lines changed

7 files changed

+50
-0
lines changed

swift/integration-tests/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
/*.xcodeproj
5+
xcuserdata/
6+
DerivedData/
7+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// swift-tools-version:5.5
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "hello-world",
8+
products: [
9+
// Products define the executables and libraries a package produces, and make them visible to other packages.
10+
.library(
11+
name: "hello-world",
12+
targets: ["hello-world"]),
13+
],
14+
targets: [
15+
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
16+
// Targets can depend on other targets in this package, and on products in packages this package depends on.
17+
.target(
18+
name: "hello-world",
19+
dependencies: []),
20+
]
21+
)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
public struct hello_world {
2+
public private(set) var text = "Hello, World!"
3+
4+
public init() {
5+
}
6+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| Sources/hello-world/hello_world.swift:0:0:0:0 | Sources/hello-world/hello_world.swift |
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from create_database_utils import *
2+
3+
run_codeql_database_create([
4+
'swift package clean',
5+
'swift build'
6+
], lang='swift')
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import swift
2+
3+
from File f
4+
select f

swift/integration-tests/qlpack.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: integration-tests-swift
2+
version: 0.0.0
3+
libraryPathDependencies: codeql/swift-all
4+
extractor: swift
5+

0 commit comments

Comments
 (0)