Skip to content

Commit 34426a0

Browse files
committed
Update NIO patch and swift-crypto test data on CI for some upstream reorganization
Also, clear up more disk space on the CI.
1 parent a9023e3 commit 34426a0

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

.github/workflows/sdks.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ jobs:
122122
elif ${{ startsWith(matrix.os, 'ubuntu') }}; then
123123
sudo apt install ninja-build
124124
fi
125+
sudo rm -fr /opt/ghc /opt/hostedtoolcache /usr/share/dotnet
126+
# /usr/share/swift
125127
126128
cd sdk-config
127129
@@ -337,8 +339,7 @@ jobs:
337339
- name: Build Swift crypto package
338340
run: |
339341
cd swift-crypto
340-
perl -pi -e 's%\\\\(testsDirectory)/.*Vectors%/data/local/tmp/pack/crypto-vectors%' Tests/{Crypto,_CryptoExtras}Tests/Utils/{RFCVector,Wycheproof}.swift
341-
perl -pi -e 's%#file%"/data/local/tmp/pack/crypto-vectors"%;s%../_CryptoExtrasVectors/%%' Tests/_CryptoExtrasTests/TestRSABlindSigning.swift
342+
perl -pi -e 's%#filePath%"/data/local/tmp/pack/crypto-vectors"%;s%../CryptoExtrasVectors/%%' Tests/CryptoExtrasTests/TestRSABlindSigning.swift
342343
${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_AARCH_FLAGS}
343344
${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_X_FLAGS}
344345
${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_ARM_FLAGS}
@@ -522,10 +523,10 @@ jobs:
522523
echo 'adb shell /data/local/tmp/pack/swift-algorithmsPackageTests.xctest' >> ~/test-toolchain.sh
523524
524525
mkdir pack/crypto-vectors pack/swift-crypto_CryptoTests.resources
525-
cp swift-crypto/Tests/Test\ Vectors/* swift-crypto/Tests/_CryptoExtrasVectors/* pack/crypto-vectors
526+
cp swift-crypto/Tests/Test\ Vectors/* swift-crypto/Tests/CryptoExtrasVectors/* pack/crypto-vectors
526527
cp swift-crypto/Tests/CryptoTests/HPKE/hpke-test-vectors.json pack/swift-crypto_CryptoTests.resources
527-
rm swift-nio/Tests/NIOFileSystemIntegrationTests/Test\ Data/*symlink
528-
cp -r swift-nio/Tests/NIOFileSystemIntegrationTests/Test\ Data/ swift-nio/Tests/NIOFileSystemIntegrationTests/FileHandleTests.swift pack
528+
rm swift-nio/Tests/NIOFSIntegrationTests/Test\ Data/*symlink
529+
cp -r swift-nio/Tests/NIOFSIntegrationTests/Test\ Data/ swift-nio/Tests/NIOFSIntegrationTests/FileHandleTests.swift pack
529530
cp yams/Tests/YamsTests/Fixtures/SourceKitten#289/debug.yaml pack
530531
cp ~/.${{ startsWith(matrix.os, 'ubuntu') && 'config/' || '' }}swiftpm/swift-sdks/${{ steps.version.outputs.tag }}-android-${ANDROID_API_LEVEL}-*.artifactbundle/swift*sdk/android*sysroot/usr/lib/x86_64-linux-android/lib*so pack
531532

swift-nio-filesystem.patch

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
diff --git a/Sources/NIOFileSystem/Internal/SystemFileHandle.swift b/Sources/NIOFileSystem/Internal/SystemFileHandle.swift
1+
diff --git a/Sources/NIOFS/Internal/SystemFileHandle.swift b/Sources/NIOFS/Internal/SystemFileHandle.swift
22
index 3dc51872..49aeeeca 100644
3-
--- a/Sources/NIOFileSystem/Internal/SystemFileHandle.swift
4-
+++ b/Sources/NIOFileSystem/Internal/SystemFileHandle.swift
3+
--- a/Sources/NIOFS/Internal/SystemFileHandle.swift
4+
+++ b/Sources/NIOFS/Internal/SystemFileHandle.swift
55
@@ -1113,7 +1113,7 @@ extension SystemFileHandle {
66
let truncate = options.contains(.truncate)
77
let delayMaterialization = transactional && isWritable && (exclusiveCreate || truncate)
@@ -11,10 +11,10 @@ index 3dc51872..49aeeeca 100644
1111
// When opening in this mode we can more "atomically" create the file, that is, by not
1212
// leaving the user with a half written file should e.g. the system crash or throw an
1313
// error while writing. On non-Android Linux we do this by opening the directory for
14-
diff --git a/Tests/NIOFileSystemIntegrationTests/BufferedReaderTests.swift b/Tests/NIOFileSystemIntegrationTests/BufferedReaderTests.swift
14+
diff --git a/Tests/NIOFSIntegrationTests/BufferedReaderTests.swift b/Tests/NIOFSIntegrationTests/BufferedReaderTests.swift
1515
index 8404e159..151fccc1 100644
16-
--- a/Tests/NIOFileSystemIntegrationTests/BufferedReaderTests.swift
17-
+++ b/Tests/NIOFileSystemIntegrationTests/BufferedReaderTests.swift
16+
--- a/Tests/NIOFSIntegrationTests/BufferedReaderTests.swift
17+
+++ b/Tests/NIOFSIntegrationTests/BufferedReaderTests.swift
1818
@@ -21,7 +21,7 @@ import XCTest
1919
final class BufferedReaderTests: XCTestCase {
2020
func testBufferedReaderSizeAndCapacity() async throws {
@@ -33,10 +33,10 @@ index 8404e159..151fccc1 100644
3333
var reader = handle.bufferedReader(capacity: .bytes(128))
3434
var buffer = ByteBuffer()
3535
while true {
36-
diff --git a/Tests/NIOFileSystemIntegrationTests/FileHandleTests.swift b/Tests/NIOFileSystemIntegrationTests/FileHandleTests.swift
36+
diff --git a/Tests/NIOFSIntegrationTests/FileHandleTests.swift b/Tests/NIOFSIntegrationTests/FileHandleTests.swift
3737
index c18e2c8e..65872fb9 100644
38-
--- a/Tests/NIOFileSystemIntegrationTests/FileHandleTests.swift
39-
+++ b/Tests/NIOFileSystemIntegrationTests/FileHandleTests.swift
38+
--- a/Tests/NIOFSIntegrationTests/FileHandleTests.swift
39+
+++ b/Tests/NIOFSIntegrationTests/FileHandleTests.swift
4040
@@ -20,9 +20,8 @@ import XCTest
4141

4242
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
@@ -67,10 +67,10 @@ index c18e2c8e..65872fb9 100644
6767

6868
func testOpenExclusiveCreateForFileWhichExistsWithoutOTMPFILEOrRenameat2() async throws {
6969
// Takes the path where 'O_TMPFILE' doesn't exist, so materializing the file is done via
70-
diff --git a/Tests/NIOFileSystemIntegrationTests/FileSystemTests.swift b/Tests/NIOFileSystemIntegrationTests/FileSystemTests.swift
70+
diff --git a/Tests/NIOFSIntegrationTests/FileSystemTests.swift b/Tests/NIOFSIntegrationTests/FileSystemTests.swift
7171
index f24736a7..310d9691 100644
72-
--- a/Tests/NIOFileSystemIntegrationTests/FileSystemTests.swift
73-
+++ b/Tests/NIOFileSystemIntegrationTests/FileSystemTests.swift
72+
--- a/Tests/NIOFSIntegrationTests/FileSystemTests.swift
73+
+++ b/Tests/NIOFSIntegrationTests/FileSystemTests.swift
7474
@@ -19,9 +19,8 @@ import NIOCore
7575
import XCTest
7676

@@ -200,10 +200,10 @@ index f24736a7..310d9691 100644
200200
let info = try await handle.info()
201201
let size = info.size
202202

203-
diff --git a/Tests/NIOFileSystemTests/Internal/SyscallTests.swift b/Tests/NIOFileSystemTests/Internal/SyscallTests.swift
203+
diff --git a/Tests/NIOFSTests/Internal/SyscallTests.swift b/Tests/NIOFSTests/Internal/SyscallTests.swift
204204
index 66ed1171..5253a650 100644
205-
--- a/Tests/NIOFileSystemTests/Internal/SyscallTests.swift
206-
+++ b/Tests/NIOFileSystemTests/Internal/SyscallTests.swift
205+
--- a/Tests/NIOFSTests/Internal/SyscallTests.swift
206+
+++ b/Tests/NIOFSTests/Internal/SyscallTests.swift
207207
@@ -17,6 +17,10 @@
208208
import SystemPackage
209209
import XCTest

0 commit comments

Comments
 (0)