Skip to content

Commit f8784a0

Browse files
committed
Add swift-testing recipe
1 parent 872feb6 commit f8784a0

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
SUMMARY = "swift-testing"
2+
DESCRIPTION = "A package with expressive and intuitive APIs that make testing your Swift code a breeze."
3+
HOMEPAGE = "https://github.com/swiftlang/swift-testing"
4+
5+
SWIFT_BUILD_TESTS = "0"
6+
7+
LICENSE = "Apache-2.0"
8+
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=9426349f482bb39d6a4a080793545176"
9+
10+
require swift-version.inc
11+
PV = "${SWIFT_VERSION}+git${SRCPV}"
12+
SRCREV_FORMAT = "swift_testing"
13+
14+
SRC_URI = "git://github.com/swiftlang/swift-testing.git;protocol=https;tag=swift-${SWIFT_VERSION}-RELEASE;nobranch=1"
15+
SRC_URI += "file://0001-build-as-dynamic-library.patch;striplevel=1;"
16+
17+
S = "${WORKDIR}/git"
18+
B = "${WORKDIR}/build"
19+
20+
inherit swift
21+
22+
do_install() {
23+
install -d ${D}${libdir}/swift/linux
24+
25+
install -m 0644 ${BUILD_DIR}/libTesting.so ${D}${libdir}/swift/linux
26+
install -m 0644 ${BUILD_DIR}/Modules/Testing.swiftmodule ${D}${libdir}/swift/linux
27+
install -m 0644 ${BUILD_DIR}/Modules/Testing.swiftdoc ${D}${libdir}/swift/linux
28+
install -m 0644 ${BUILD_DIR}/Modules/Testing.swiftinterface ${D}${libdir}/swift/linux
29+
30+
rm -f ${BUILD_DIR}/Modules/*.swiftsourceinfo
31+
}
32+
33+
FILES:${PN} = "\
34+
${libdir}/swift/linux/libTesting.so \
35+
"
36+
37+
FILES:${PN}-dev = "\
38+
${libdir}/swift/linux/Testing.swiftmodule \
39+
${libdir}/swift/linux/Testing.swiftdoc \
40+
${libdir}/swift/linux/Testing.swiftinterface \
41+
"
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
From 150381e5bda561daa70b53aee1f222254bb4cf00 Mon Sep 17 00:00:00 2001
2+
From: Luke Howard <[email protected]>
3+
Date: Mon, 17 Mar 2025 10:14:02 +1100
4+
Subject: [PATCH] build as dynamic library
5+
6+
---
7+
Package.swift | 5 ++++-
8+
1 file changed, 4 insertions(+), 1 deletion(-)
9+
10+
diff --git a/Package.swift b/Package.swift
11+
index c498b59..7065f6f 100644
12+
--- a/Package.swift
13+
+++ b/Package.swift
14+
@@ -28,6 +28,7 @@ let package = Package(
15+
products: [
16+
.library(
17+
name: "Testing",
18+
+ type: .dynamic,
19+
targets: ["Testing"]
20+
),
21+
],
22+
@@ -45,7 +46,9 @@ let package = Package(
23+
],
24+
exclude: ["CMakeLists.txt"],
25+
cxxSettings: .packageSettings,
26+
- swiftSettings: .packageSettings
27+
+ swiftSettings: .packageSettings + [
28+
+ .unsafeFlags(["-enable-library-evolution", "-emit-module-interface", "-emit-module-interface-path", "Testing.swiftinterface"])
29+
+ ]
30+
),
31+
.testTarget(
32+
name: "TestingTests",
33+
--
34+
2.43.0
35+

0 commit comments

Comments
 (0)