Skip to content

Commit a2bdb72

Browse files
Tests: adjust SPMBuildCoreTests for Windows
The file system on Windows does not have nanosecond granularity (nor is this is a guaranteed file system feature on all file systems). Add a sleep before the execution to ensure that we have sufficient precision to read a difference. Co-authored-by: Max Desiatov <[email protected]>
1 parent 4a42f25 commit a2bdb72

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Tests/SPMBuildCoreTests/PluginInvocationTests.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,11 @@ class PluginInvocationTests: XCTestCase {
495495
}
496496
""")
497497

498+
// NTFS does not have nanosecond granularity (nor is this is a guaranteed file
499+
// system feature on all file systems). Add a sleep before the execution to ensure that we have sufficient
500+
// precision to read a difference.
501+
Thread.sleep(forTimeInterval: 1)
502+
498503
// Recompile the plugin again.
499504
let thirdExecModTime: Date
500505
do {

0 commit comments

Comments
 (0)