Skip to content

Commit 09fd67e

Browse files
committed
[Test] Fix flaky lock_interface test
Testing that the compiler rebuilds the same module more than once with -disable-interface-lock was not reliable as some jobs could be executed after the module was rebuilt. Just make sure the compiler accepts the flag :/
1 parent c7f2130 commit 09fd67e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/Driver/lock_interface.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
// RUN: %target-swiftc_driver -j20 %t/main.swift %t/file-01.swift %t/file-02.swift %t/file-03.swift -I %t/sdk -Xfrontend -Rmodule-interface-rebuild -module-cache-path %t/module-cache &> %t/result.txt
1414
// RUN: %FileCheck %s -check-prefix=CHECK-REBUILD < %t/result.txt
1515

16+
/// Checking that the compiler rebuilds the same module more than once can
17+
/// fail depending on how fast the jobs are executed. Just make sure the
18+
/// compiler accepts the -disable-interface-lock flag.
1619
// RUN: %target-swiftc_driver -j20 %t/main.swift %t/file-01.swift %t/file-02.swift %t/file-03.swift -I %t/sdk -Xfrontend -Rmodule-interface-rebuild -Xfrontend -disable-interface-lock -module-cache-path %t/module-cache-no-lock &> %t/result.txt
17-
1820
// RUN: %FileCheck %s -check-prefix=CHECK-REBUILD-NO-LOCK < %t/result.txt
1921

2022
// Reset the permissions
@@ -26,5 +28,3 @@
2628
// CHECK-REBUILD-NOT: building module interface without lock file
2729

2830
// CHECK-REBUILD-NO-LOCK: rebuilding module 'Foo' from interface
29-
// CHECK-REBUILD-NO-LOCK: rebuilding module 'Foo' from interface
30-
// CHECK-REBUILD-NO-LOCK: rebuilding module 'Foo' from interface

0 commit comments

Comments
 (0)