Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 25 additions & 4 deletions test/Frontend/type-fingerprint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,27 @@
// RUN: cp %S/Inputs/type-fingerprint/{main,a}.swift %t
// RUN: cp %S/Inputs/type-fingerprint/ofm.json %t
// RUN: cp %S/Inputs/type-fingerprint/b0.swift %t/b.swift

// Seeing weird failure on CI, so set the mod times
// RUN: touch -t 200101010101 %t/*.swift

// RUN: cd %t && %swiftc_driver -disable-type-fingerprints -enable-batch-mode -j2 -incremental -driver-show-incremental ./main.swift ./a.swift ./b.swift -module-name main -output-file-map ofm.json >&output1

// RUN: cp %t/b.swiftdeps %t/b1.swiftdeps
// only-run-for-debugging: cp %t/b.swiftdeps %t/b1.swiftdeps

// Change one type, but uses of all types get recompiled

// RUN: cp %S/Inputs/type-fingerprint/b1.swift %t/b.swift

// Seeing weird failure on CI, so ensure that b.swift is newer
// RUN: touch -t 200201010101 %t/*
// RUN: touch -t 200101010101 %t/*.swift
// RUN: touch -t 200301010101 %t/b.swift

// RUN: cd %t && %swiftc_driver -disable-type-fingerprints -enable-batch-mode -j2 -incremental -driver-show-incremental ./main.swift ./a.swift ./b.swift -module-name main -output-file-map ofm.json >&output2

// RUN: cp %t/b.swiftdeps %t/b2.swiftdeps
// Save for debugging:
// only-run-for-debugging: cp %t/b.swiftdeps %t/b2.swiftdeps

// RUN: %FileCheck -check-prefix=CHECK-MAINAB-RECOMPILED %s < %t/output2

Expand All @@ -40,16 +51,26 @@
// RUN: cp %S/Inputs/type-fingerprint/{main,a}.swift %t
// RUN: cp %S/Inputs/type-fingerprint/ofm.json %t
// RUN: cp %S/Inputs/type-fingerprint/b0.swift %t/b.swift

// Seeing weird failure on CI, so set the mod times
// RUN: touch -t 200101010101 %t/*.swift

// RUN: cd %t && %swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental ./main.swift ./a.swift ./b.swift -module-name main -output-file-map ofm.json >&output3

// RUN: cp %t/b.swiftdeps %t/b3.swiftdeps
// only-run-for-debugging: cp %t/b.swiftdeps %t/b3.swiftdeps

// Change one type, only uses of that type get recompiled

// RUN: cp %S/Inputs/type-fingerprint/b1.swift %t/b.swift

// Seeing weird failure on CI, so ensure that b.swift is newer
// RUN: touch -t 200201010101 %t/*
// RUN: touch -t 200101010101 %t/*.swift
// RUN: touch -t 200301010101 %t/b.swift

// RUN: cd %t && %swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental ./main.swift ./a.swift ./b.swift -module-name main -output-file-map ofm.json >&output4

// RUN: cp %t/b.swiftdeps %t/b4.swiftdeps
// only-run-for-debugging: cp %t/b.swiftdeps %t/b4.swiftdeps

// RUN: %FileCheck -check-prefix=CHECK-MAINB-RECOMPILED %s < %t/output4

Expand Down