Skip to content

Move Legacy Build Record Dependent Tests #62839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Fine-grained v0
---
allNodes:
- key:
kind: sourceFileProvide
aspect: interface
context: ''
name: bad.swiftdeps
fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba
sequenceNumber: 0
defsIDependUpon: [ 2 ]
isProvides: true
- key:
kind: sourceFileProvide
aspect: implementation
context: ''
name: bad.swiftdeps
fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba
sequenceNumber: 1
defsIDependUpon: [ ]
isProvides: true
- key:
kind: topLevel
aspect: interface
context: ''
name: a
sequenceNumber: 2
defsIDependUpon: [ 0 ]
isProvides: true
- key:
kind: topLevel
aspect: implementation
context: ''
name: a
sequenceNumber: 3
defsIDependUpon: [ ]
isProvides: true
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Fine-grained v0
---
allNodes:
- key:
kind: sourceFileProvide
aspect: interface
context: ''
name: main.swiftdeps
fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba
sequenceNumber: 0
defsIDependUpon: [ 2 ]
isProvides: true
- key:
kind: sourceFileProvide
aspect: implementation
context: ''
name: main.swiftdeps
fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba
sequenceNumber: 1
defsIDependUpon: [ ]
isProvides: true
- key:
kind: topLevel
aspect: interface
context: ''
name: a
sequenceNumber: 2
defsIDependUpon: [ 0 ]
isProvides: false
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Fine-grained v0
---
allNodes:
- key:
kind: sourceFileProvide
aspect: interface
context: ''
name: other.swiftdeps
fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba
sequenceNumber: 0
defsIDependUpon: [ ]
isProvides: true
- key:
kind: sourceFileProvide
aspect: implementation
context: ''
name: other.swiftdeps
fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba
sequenceNumber: 1
defsIDependUpon: [ 2 ]
isProvides: true
- key:
kind: topLevel
aspect: interface
context: ''
name: a
sequenceNumber: 2
defsIDependUpon: [ 0 ]
isProvides: false
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"./main.swift": {
"object": "./main.o",
"swift-dependencies": "./main.swiftdeps"
},
"./bad.swift": {
"object": "./bad.o",
"swift-dependencies": "./bad.swiftdeps"
},
"./other.swift": {
"object": "./other.o",
"swift-dependencies": "./other.swiftdeps"
},
"": {
"swift-dependencies": "./main~buildrecord.swiftdeps"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Fine-grained v0
---
allNodes:
- key:
kind: sourceFileProvide
aspect: interface
context: ''
name: main.swiftdeps
fingerprint: d41d8cd98f00b204e9800998ecf8427e
sequenceNumber: 0
defsIDependUpon: [ ]
isProvides: true
- key:
kind: sourceFileProvide
aspect: implementation
context: ''
name: main.swiftdeps
fingerprint: d41d8cd98f00b204e9800998ecf8427e
sequenceNumber: 1
defsIDependUpon: [ ]
isProvides: true
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Fine-grained v0
---
allNodes:
- key:
kind: sourceFileProvide
aspect: interface
context: ''
name: other.swiftdeps
fingerprint: d41d8cd98f00b204e9800998ecf8427e
sequenceNumber: 0
defsIDependUpon: [ ]
isProvides: true
- key:
kind: sourceFileProvide
aspect: implementation
context: ''
name: other.swiftdeps
fingerprint: d41d8cd98f00b204e9800998ecf8427e
sequenceNumber: 1
defsIDependUpon: [ ]
isProvides: true
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"./main.swift": {
"object": "./main.o",
"swift-dependencies": "./main.swiftdeps"
},
"./other.swift": {
"object": "./other.o",
"swift-dependencies": "./other.swiftdeps"
},
"": {
"swift-dependencies": "./main~buildrecord.swiftdeps"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Fine-grained v0
---
allNodes:
- key:
kind: sourceFileProvide
aspect: interface
context: ''
name: './main.swiftdeps'
fingerprint: 68a74ca633848ae5e65ddc9d5e28b0e6
sequenceNumber: 0
defsIDependUpon: [ 2 ]
isProvides: true
- key:
kind: sourceFileProvide
aspect: implementation
context: ''
name: './main.swiftdeps'
fingerprint: 68a74ca633848ae5e65ddc9d5e28b0e6
sequenceNumber: 1
defsIDependUpon: [ ]
isProvides: true
- key:
kind: topLevel
aspect: interface
context: ''
name: a
sequenceNumber: 2
defsIDependUpon: [ ]
isProvides: false
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Fine-grained v0
---
allNodes:
- key:
kind: sourceFileProvide
aspect: interface
context: ''
name: './other.swiftdeps'
fingerprint: befb33f4269c9adc0644b060f467ef06
sequenceNumber: 0
defsIDependUpon: [ 2 ]
isProvides: true
- key:
kind: sourceFileProvide
aspect: implementation
context: ''
name: './other.swiftdeps'
fingerprint: befb33f4269c9adc0644b060f467ef06
sequenceNumber: 1
defsIDependUpon: [ ]
isProvides: true
- key:
kind: topLevel
aspect: interface
context: ''
name: a
sequenceNumber: 2
defsIDependUpon: [ 0 ]
isProvides: true
- key:
kind: topLevel
aspect: implementation
context: ''
name: a
sequenceNumber: 3
defsIDependUpon: [ ]
isProvides: true
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"./main.swift": {
"object": "./main.o",
"swift-dependencies": "./main.swiftdeps",
"swiftmodule": "./main.swiftmodule",
"swiftdoc": "./main.swiftdoc",
},
"./other.swift": {
"object": "./other.o",
"swift-dependencies": "./other.swiftdeps",
"swiftmodule": "./other.swiftmodule",
"swiftdoc": "./other.swiftdoc",
},
"": {
"swift-dependencies": "./main~buildrecord.swiftdeps"
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
// rdar://103866776 (Swift CI: [main] 1. OSS - Swift ASAN - macOS: Multiple test failures after Swift driver change)
// REQUIRES: rdar103866776

// REQUIRES: use_legacy_driver
// REQUIRES: shell
// Verify that the top-level build record file from the last incremental
// compilation is preserved with the same name, suffixed by a '~'.

// RUN: %empty-directory(%t)
// RUN: cp -r %S/Inputs/one-way-fine/* %t
// RUN: %{python} %S/Inputs/touch.py 443865900 %t/*
// RUN: %{python} %S/../Inputs/touch.py 443865900 %t/*
// RUN: echo '{version: "'$(%swiftc_driver_plain -version | head -n1)'", inputs: {"./main.swift": [443865900, 0], "./other.swift": [443865900, 0]}}' > %t/main~buildrecord.swiftdeps
// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json
// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/../Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json

// RUN: %FileCheck -check-prefix CHECK-ORIGINAL %s < main~buildrecord.swiftdeps~
// CHECK-ORIGINAL: inputs: {"{{(./)?}}main.swift": [443865900, 0], "{{(./)?}}other.swift": [443865900, 0]}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// rdar://103866776 (Swift CI: [main] 1. OSS - Swift ASAN - macOS: Multiple test failures after Swift driver change)
// REQUIRES: rdar103866776

// REQUIRES: use_legacy_driver
// REQUIRES: shell
// Test that when:
//
Expand All @@ -14,14 +12,14 @@

// RUN: %empty-directory(%t)
// RUN: cp -r %S/Inputs/one-way-with-swiftdeps-fine/* %t
// RUN: %{python} %S/Inputs/touch.py 443865900 %t/*
// RUN: %{python} %S/../Inputs/touch.py 443865900 %t/*
// RUN: echo '{version: "'$(%swiftc_driver_plain -version | head -n1)'", inputs: {"./main.swift": [443865900, 0], "./other.swift": [443865900, 0]}}' > %t/main~buildrecord.swiftdeps

// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-INCREMENTAL %s
// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/../Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-INCREMENTAL %s
// CHECK-INCREMENTAL-NOT: Incremental compilation has been disabled
// CHECK-INCREMENTAL: Queuing (initial): {compile: main.o <= main.swift}

// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -g -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-ARGS-MISMATCH %s
// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/../Inputs/update-dependencies.py;%swift-dependency-tool" -g -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-ARGS-MISMATCH %s
// CHECK-ARGS-MISMATCH: Incremental compilation has been disabled{{.*}}different arguments
// CHECK-ARGS-MISMATCH-NOT: Queuing (initial): {compile: main.o <= main.swift}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// rdar://103866776 (Swift CI: [main] 1. OSS - Swift ASAN - macOS: Multiple test failures after Swift driver change)
// REQUIRES: rdar103866776

// REQUIRES: use_legacy_driver
// REQUIRES: shell
// Test that when:
//
Expand All @@ -14,22 +12,22 @@

// RUN: %empty-directory(%t)
// RUN: cp -r %S/Inputs/one-way-with-swiftdeps-fine/* %t
// RUN: %{python} %S/Inputs/touch.py 443865900 %t/*
// RUN: %{python} %S/../Inputs/touch.py 443865900 %t/*
// RUN: echo '{version: "'$(%swiftc_driver_plain -version | head -n1)'", inputs: {"./main.swift": [443865900, 0], "./other.swift": [443865900, 0]}}' > %t/main~buildrecord.swiftdeps

// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-INCREMENTAL %s
// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/../Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-INCREMENTAL %s
// CHECK-INCREMENTAL-NOT: Incremental compilation has been disabled
// CHECK-INCREMENTAL: Queuing (initial): {compile: main.o <= main.swift}

// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -whole-module-optimization -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-WMO %s
// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/../Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -whole-module-optimization -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-WMO %s
// CHECK-WMO: Incremental compilation has been disabled{{.*}}whole module optimization
// CHECK-WMO-NOT: Queuing (initial): {compile: main.o <= main.swift}

// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -embed-bitcode -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-BITCODE %s
// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/../Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -embed-bitcode -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-BITCODE %s
// CHECK-BITCODE: Incremental compilation has been disabled{{.*}}LLVM IR bitcode
// CHECK-BITCODE-NOT: Queuing (initial): {compile: main.o <= main.swift}

// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -whole-module-optimization -embed-bitcode -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-WMO-AND-BITCODE %s
// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/../Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -whole-module-optimization -embed-bitcode -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-WMO-AND-BITCODE %s
// CHECK-WMO-AND-BITCODE: Incremental compilation has been disabled{{.*}}whole module optimization
// CHECK-WMO-AND-BITCODE-NOT: Incremental compilation has been disabled
// CHECK-WMO-AND-BITCODE-NOT: Queuing (initial): {compile: main.o <= main.swift}
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// rdar://103866776 (Swift CI: [main] 1. OSS - Swift ASAN - macOS: Multiple test failures after Swift driver change)
// REQUIRES: rdar103866776

// REQUIRES: use_legacy_driver
// REQUIRES: shell
// Test that when:
//
Expand All @@ -14,14 +12,14 @@

// RUN: %empty-directory(%t)
// RUN: cp -r %S/Inputs/one-way-with-swiftdeps-fine/* %t
// RUN: %{python} %S/Inputs/touch.py 443865900 %t/*
// RUN: %{python} %S/../Inputs/touch.py 443865900 %t/*
// RUN: echo '{version: "'$(%swiftc_driver_plain -version | head -n1)'", inputs: {"./main.swift": [443865900, 0], "./other.swift": [443865900, 0]}}' > %t/main~buildrecord.swiftdeps

// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-INCREMENTAL %s
// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/../Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-INCREMENTAL %s
// CHECK-INCREMENTAL-NOT: Incremental compilation has been disabled
// CHECK-INCREMENTAL: Queuing (initial): {compile: main.o <= main.swift}

// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-INPUTS-MISMATCH %s
// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/../Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-INPUTS-MISMATCH %s
// CHECK-INPUTS-MISMATCH: Incremental compilation has been disabled{{.*}}inputs
// CHECK-INPUTS-MISMATCH: {{(./)?}}other.swift
// CHECK-INPUTS-MISMATCH-NOT: Queuing (initial): {compile: main.o <= main.swift}
Loading