Skip to content

Commit daf9af4

Browse files
committed
[Test] Make permission reset in lock_interface more reliable
1 parent 09fd67e commit daf9af4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/Driver/lock_interface.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@
1010
// RUN: echo 'import Foo' > %t/file-01.swift
1111
// RUN: echo 'import Foo' > %t/file-02.swift
1212
// RUN: echo 'import Foo' > %t/file-03.swift
13-
// 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
14-
// RUN: %FileCheck %s -check-prefix=CHECK-REBUILD < %t/result.txt
13+
// 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-with-lock.txt
1514

1615
/// Checking that the compiler rebuilds the same module more than once can
1716
/// fail depending on how fast the jobs are executed. Just make sure the
1817
/// compiler accepts the -disable-interface-lock flag.
19-
// 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
20-
// RUN: %FileCheck %s -check-prefix=CHECK-REBUILD-NO-LOCK < %t/result.txt
18+
// 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-no-lock.txt
2119

22-
// Reset the permissions
20+
/// Reset the permissions before running the tests likely to fail.
2321
// RUN: chmod a+w %t/sdk
2422

2523
// Ensure we only build Foo module once from the interface
24+
// RUN: %FileCheck %s -check-prefix=CHECK-REBUILD < %t/result-with-lock.txt
2625
// CHECK-REBUILD: rebuilding module 'Foo' from interface
2726
// CHECK-REBUILD-NOT: rebuilding module 'Foo' from interface
2827
// CHECK-REBUILD-NOT: building module interface without lock file
2928

29+
// RUN: %FileCheck %s -check-prefix=CHECK-REBUILD-NO-LOCK < %t/result-no-lock.txt
3030
// CHECK-REBUILD-NO-LOCK: rebuilding module 'Foo' from interface

0 commit comments

Comments
 (0)