|
| 1 | +// RUN: %empty-directory(%t) |
| 2 | +// RUN: cp -r %S/Inputs/module-fingerprint/* %t |
| 3 | + |
| 4 | +// |
| 5 | +// Set up a clean incremental build of all three modules |
| 6 | +// |
| 7 | + |
| 8 | +// RUN: cd %t && %target-swiftc_driver -c -incremental -emit-dependencies -emit-module -emit-module-path %t/C.swiftmodule -enable-experimental-cross-module-incremental-build -module-name C -I %t -output-file-map %t/C.json -working-directory %t -driver-show-incremental -driver-show-job-lifecycle C.swift |
| 9 | +// RUN: cd %t && %target-swiftc_driver -c -incremental -emit-dependencies -emit-module -emit-module-path %t/B.swiftmodule -enable-experimental-cross-module-incremental-build -module-name B -I %t -output-file-map %t/B.json -working-directory %t -driver-show-incremental -driver-show-job-lifecycle B.swift |
| 10 | +// RUN: cd %t && %target-swiftc_driver -c -incremental -emit-dependencies -emit-module -emit-module-path %t/A.swiftmodule -enable-experimental-cross-module-incremental-build -module-name A -I %t -output-file-map %t/A.json -working-directory %t -driver-show-incremental -driver-show-job-lifecycle A.swift |
| 11 | + |
| 12 | +// RUN: %target-swift-ide-test -print-module-metadata -module-to-print C -enable-swiftsourceinfo -I %t -source-filename %s | %FileCheck %s --check-prefix=CHECK-CLEAN-C |
| 13 | +// RUN: %target-swift-ide-test -print-module-metadata -module-to-print B -enable-swiftsourceinfo -I %t -source-filename %s | %FileCheck %s --check-prefix=CHECK-CLEAN-B |
| 14 | +// RUN: %target-swift-ide-test -print-module-metadata -module-to-print A -enable-swiftsourceinfo -I %t -source-filename %s | %FileCheck %s --check-prefix=CHECK-CLEAN-A |
| 15 | + |
| 16 | +// CHECK-CLEAN-C: fingerprint=6e60fd224d614a59568a348e0ac9b55a |
| 17 | +// CHECK-CLEAN-B: fingerprint=bfa14052e1df9253b7bf7e0eb7cfc505 |
| 18 | +// CHECK-CLEAN-A: fingerprint=a939d89f07c766a4607c5fe1a1715cf5 |
| 19 | + |
| 20 | +// |
| 21 | +// Now change C and ensure that B rebuilds but A does not |
| 22 | +// |
| 23 | + |
| 24 | +// RUN: cd %t && echo "public func other() {}" >> C.swift |
| 25 | + |
| 26 | +// RUN: cd %t && %target-swiftc_driver -c -incremental -emit-dependencies -emit-module -emit-module-path %t/C.swiftmodule -enable-experimental-cross-module-incremental-build -module-name C -I %t -output-file-map %t/C.json -working-directory %t -driver-show-incremental -driver-show-job-lifecycle C.swift |
| 27 | +// RUN: touch %t/C.swiftmodule |
| 28 | +// RUN: cd %t && %target-swiftc_driver -c -incremental -emit-dependencies -emit-module -emit-module-path %t/B.swiftmodule -enable-experimental-cross-module-incremental-build -module-name B -I %t -output-file-map %t/B.json -working-directory %t -driver-show-incremental -driver-show-job-lifecycle B.swift |
| 29 | +// RUN: cd %t && %target-swiftc_driver -c -incremental -emit-dependencies -emit-module -emit-module-path %t/A.swiftmodule -enable-experimental-cross-module-incremental-build -module-name A -I %t -output-file-map %t/A.json -working-directory %t -driver-show-incremental -driver-show-job-lifecycle A.swift |
| 30 | + |
| 31 | +// RUN: %target-swift-ide-test -print-module-metadata -module-to-print C -enable-swiftsourceinfo -I %t -source-filename %s | %FileCheck %s --check-prefix=CHECK-INCREMENTAL-C |
| 32 | +// RUN: %target-swift-ide-test -print-module-metadata -module-to-print B -enable-swiftsourceinfo -I %t -source-filename %s | %FileCheck %s --check-prefix=CHECK-INCREMENTAL-B |
| 33 | +// RUN: %target-swift-ide-test -print-module-metadata -module-to-print A -enable-swiftsourceinfo -I %t -source-filename %s | %FileCheck %s --check-prefix=CHECK-INCREMENTAL-A |
| 34 | + |
| 35 | +// CHECK-INCREMENTAL-C: fingerprint=3e68d59b74032e18401ec978cdb11cf3 |
| 36 | +// CHECK-INCREMENTAL-B: fingerprint=bfa14052e1df9253b7bf7e0eb7cfc505 |
| 37 | +// CHECK-INCREMENTAL-A: fingerprint=a939d89f07c766a4607c5fe1a1715cf5 |
0 commit comments