|
1 |
| -// REQUIRES: rdar59977439 |
2 | 1 | // RUN: %empty-directory(%t)
|
| 2 | +// RUN: %empty-directory(%t/sdk) |
3 | 3 | // RUN: %empty-directory(%t/module-cache-lock)
|
4 | 4 | // RUN: %empty-directory(%t/module-cache-no-lock)
|
5 |
| -// RUN: echo 'public func foo() {}' > %t/Foo.swift |
6 |
| -// RUN: %target-swift-frontend-typecheck -emit-module-interface-path %t/Foo.swiftinterface %t/Foo.swift -enable-library-evolution |
| 5 | +// RUN: echo 'public func foo() {}' > %t/sdk/Foo.swift |
| 6 | +// RUN: %target-swift-frontend-typecheck -emit-module-interface-path %t/sdk/Foo.swiftinterface %t/sdk/Foo.swift -enable-library-evolution |
| 7 | +// RUN: chmod a-w %t/sdk |
| 8 | + |
7 | 9 | // RUN: touch %t/main.swift %t/file-01.swift %t/file-02.swift %t/file-03.swift
|
8 | 10 | // RUN: echo 'import Foo' > %t/file-01.swift
|
9 | 11 | // RUN: echo 'import Foo' > %t/file-02.swift
|
10 | 12 | // RUN: echo 'import Foo' > %t/file-03.swift
|
11 |
| -// RUN: %target-swiftc_driver -j20 %t/main.swift %t/file-01.swift %t/file-02.swift %t/file-03.swift -I %t -Xfrontend -Rmodule-interface-rebuild -module-cache-path %t/module-cache &> %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.txt |
12 | 14 | // RUN: %FileCheck %s -check-prefix=CHECK-REBUILD < %t/result.txt
|
13 | 15 |
|
14 |
| -// RUN: %target-swiftc_driver -j20 %t/main.swift %t/file-01.swift %t/file-02.swift %t/file-03.swift -I %t -Xfrontend -Rmodule-interface-rebuild -Xfrontend -disable-interface-lock -module-cache-path %t/module-cache-no-lock &> %t/result.txt |
| 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 | 17 |
|
16 | 18 | // RUN: %FileCheck %s -check-prefix=CHECK-REBUILD-NO-LOCK < %t/result.txt
|
17 | 19 |
|
| 20 | +// Reset the permissions |
| 21 | +// RUN: chmod a+w %t/sdk |
| 22 | + |
18 | 23 | // Ensure we only build Foo module once from the interface
|
19 | 24 | // CHECK-REBUILD: rebuilding module 'Foo' from interface
|
20 | 25 | // CHECK-REBUILD-NOT: rebuilding module 'Foo' from interface
|
| 26 | +// CHECK-REBUILD-NOT: building module interface without lock file |
21 | 27 |
|
22 | 28 | // CHECK-REBUILD-NO-LOCK: rebuilding module 'Foo' from interface
|
23 | 29 | // CHECK-REBUILD-NO-LOCK: rebuilding module 'Foo' from interface
|
|
0 commit comments