-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cmake] Make unittests build with swift-testing using CMake.
- Loading branch information
Showing
7 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
.DS_Store | ||
/.build | ||
/build | ||
/b | ||
/Packages | ||
xcuserdata/ | ||
DerivedData/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Start testing: Apr 29 10:52 Pacific Daylight Time | ||
---------------------------------------------------------- | ||
End testing: Apr 29 10:52 Pacific Daylight Time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
add_library(TestsCommon | ||
Common/PNGUtilities.swift) | ||
|
||
SwiftTesting_GenerateDerivedSources() | ||
add_executable(SwiftWebdriverPackageTests | ||
UnitTests/APITests.swift | ||
UnitTests/MockWebDriver.swift | ||
${swiftwebdriver_SwiftTesting_Sources}) | ||
set_target_properties(SwiftWebdriverPackageTests PROPERTIES | ||
SUFFIX .swift-testing) | ||
target_link_libraries(SwiftWebdriverPackageTests PRIVATE | ||
WebDriver | ||
Testing | ||
TestsCommon) | ||
|
||
add_test(NAME SwiftWebdriverPackageTests | ||
COMMAND SwiftWebdriverPackageTests) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
include(FetchContent) | ||
|
||
# Ignore warnings from dependencies' source code. | ||
add_compile_options($<$<COMPILE_LANGUAGE:Swift>:-suppress-warnings>) | ||
add_compile_options($<$<COMPILE_LANGUAGE:Swift>:-suppress-remarks>) | ||
|
||
if(BUILD_TESTING) | ||
include(SwiftTesting.cmake) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FetchContent_Declare(SwiftTesting | ||
# GIT_REPOSITORY https://github.com/apple/swift-testing.git | ||
# GIT_TAG e07ef28413b5be951fa5672b290bc10fa2e3cd65) | ||
GIT_REPOSITORY https://github.com/thebrowsercompany/swift-testing.git | ||
GIT_TAG 7512437778c16acf88bf2b4377b19c84864d327c) | ||
FetchContent_GetProperties(SwiftTesting) | ||
if(NOT SwiftTesting_POPULATED) | ||
message(STATUS "syncing SwiftTesting") | ||
FetchContent_MakeAvailable(SwiftTesting) | ||
endif() |