File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -355,11 +355,17 @@ final class JobExecutorTests: XCTestCase {
355
355
let jobs = try driver. planBuild ( )
356
356
XCTAssertEqual ( jobs. count, 1 )
357
357
XCTAssertTrue ( jobs [ 0 ] . requiresInPlaceExecution)
358
+ let soleJob = try XCTUnwrap ( jobs. first)
359
+
360
+ // Sleep for 1s to allow for quiescing mtimes on filesystems with
361
+ // insufficient timestamp precision.
362
+ Thread . sleep ( forTimeInterval: 1 )
358
363
359
364
// Change the file
360
365
try localFileSystem. writeFileContents ( main, bytes: " let foo = 1 " )
361
-
362
- XCTAssertThrowsError ( try driver. run ( jobs: jobs) ) {
366
+ // Ensure that the file modification since the start of the build planning process
367
+ // results in a corresponding error.
368
+ XCTAssertThrowsError ( try soleJob. verifyInputsNotModified ( since: driver. recordedInputModificationDates, fileSystem: localFileSystem) ) {
363
369
XCTAssertEqual ( $0 as? Job . InputError ,
364
370
. inputUnexpectedlyModified( TypedVirtualPath ( file: VirtualPath . absolute ( main) . intern ( ) , type: . swift) ) )
365
371
}
You can’t perform that action at this time.
0 commit comments