|
10 | 10 | // RUN: echo 'import Foo' > %t/file-01.swift
|
11 | 11 | // RUN: echo 'import Foo' > %t/file-02.swift
|
12 | 12 | // 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 |
15 | 14 |
|
16 |
| -// 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 |
| 15 | +/// Checking that the compiler rebuilds the same module more than once can |
| 16 | +/// fail depending on how fast the jobs are executed. Just make sure the |
| 17 | +/// compiler accepts the -disable-interface-lock flag. |
| 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 |
17 | 19 |
|
18 |
| -// RUN: %FileCheck %s -check-prefix=CHECK-REBUILD-NO-LOCK < %t/result.txt |
19 |
| - |
20 |
| -// Reset the permissions |
| 20 | +/// Reset the permissions before running the tests likely to fail. |
21 | 21 | // RUN: chmod a+w %t/sdk
|
22 | 22 |
|
23 | 23 | // Ensure we only build Foo module once from the interface
|
| 24 | +// RUN: %FileCheck %s -check-prefix=CHECK-REBUILD < %t/result-with-lock.txt |
24 | 25 | // CHECK-REBUILD: rebuilding module 'Foo' from interface
|
25 | 26 | // CHECK-REBUILD-NOT: rebuilding module 'Foo' from interface
|
26 | 27 | // CHECK-REBUILD-NOT: building module interface without lock file
|
27 | 28 |
|
28 |
| -// CHECK-REBUILD-NO-LOCK: rebuilding module 'Foo' from interface |
29 |
| -// CHECK-REBUILD-NO-LOCK: rebuilding module 'Foo' from interface |
| 29 | +// RUN: %FileCheck %s -check-prefix=CHECK-REBUILD-NO-LOCK < %t/result-no-lock.txt |
30 | 30 | // CHECK-REBUILD-NO-LOCK: rebuilding module 'Foo' from interface
|
0 commit comments