mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Emit traces related to sdk dependencies and mark test case failing.
Exposes the issue in rdar://problem/55752426.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
// XFAIL: *
|
||||
|
||||
// RUN: %empty-directory(%t)
|
||||
|
||||
// 1) Build a prebuilt cache for our SDK
|
||||
@@ -32,7 +34,7 @@
|
||||
|
||||
// 2) Baseline check: Make sure we use the interface when not passing the prebuilt module cache path
|
||||
//
|
||||
// RUN: %target-swift-frontend -typecheck -I %t/my-sdk -sdk %t/my-sdk -module-cache-path %t/MCP -emit-dependencies-path %t/dummy.d -track-system-dependencies %s
|
||||
// RUN: %target-swift-frontend -typecheck -I %t/my-sdk -sdk %t/my-sdk -module-cache-path %t/MCP -emit-dependencies-path %t/dummy.d -track-system-dependencies -emit-loaded-module-trace-path %t/trace.json %s
|
||||
//
|
||||
// Check SdkLib and ExportedLib are in the module cache
|
||||
// RUN: test -f %t/MCP/ExportedLib-*.swiftmodule
|
||||
@@ -58,13 +60,23 @@
|
||||
// DEPFILE-DAG: ExportedLib.swiftinterface
|
||||
// DEPFILE-DAG: SDKDependencies.swift
|
||||
//
|
||||
// Check we didn't emit anything from the cache in the trace file either
|
||||
// RUN: cat %t/trace.json | %FileCheck %s -check-prefix=TRACEFILE-NEGATIVE
|
||||
// RUN: cat %t/trace.json | %FileCheck %s -check-prefix=TRACEFILE
|
||||
//
|
||||
// TRACEFILE-NEGATIVE-NOT: {{[/\\]MCP[/\\]}}
|
||||
// TRACEFILE-NEGATIVE-NOT: {{[/\\]prebuilt-cache[/\\]}}
|
||||
//
|
||||
// TRACEFILE-DAG: SdkLib.swiftinterface
|
||||
// TRACEFILE-DAG: ExportedLib.swiftinterface
|
||||
//
|
||||
// RUN: %empty-directory(%t/MCP)
|
||||
// RUN: echo '2: PASSED'
|
||||
|
||||
|
||||
// 3) Baseline check: Make sure we use the the prebuilt module cache when using the SDK it was built with
|
||||
//
|
||||
// RUN: %target-swift-frontend -typecheck -I %t/my-sdk -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -module-cache-path %t/MCP -emit-dependencies-path %t/dummy.d -track-system-dependencies %s
|
||||
// RUN: %target-swift-frontend -typecheck -I %t/my-sdk -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -module-cache-path %t/MCP -emit-dependencies-path %t/dummy.d -track-system-dependencies -emit-loaded-module-trace-path %t/trace.json %s
|
||||
//
|
||||
// Check SdkLib and ExportedLib are in the module cache
|
||||
// RUN: test -f %t/MCP/SdkLib-*.swiftmodule
|
||||
@@ -99,6 +111,10 @@
|
||||
// RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPFILE-NEGATIVE
|
||||
// RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPFILE
|
||||
//
|
||||
// Check we didn't emit anything from the cache in the trace file either
|
||||
// RUN: cat %t/trace.json | %FileCheck %s -check-prefix=TRACEFILE-NEGATIVE
|
||||
// RUN: cat %t/trace.json | %FileCheck %s -check-prefix=TRACEFILE
|
||||
//
|
||||
// RUN: %empty-directory(%t/MCP)
|
||||
// RUN: echo '3: PASSED'
|
||||
|
||||
@@ -108,7 +124,7 @@
|
||||
// RUN: mv %t/my-sdk %t/my-new-sdk
|
||||
// RUN: mkdir %t/new-dir
|
||||
// RUN: mv %t/prebuilt-cache %t/new-dir/
|
||||
// RUN: %target-swift-frontend -typecheck -I %t/my-new-sdk -sdk %t/my-new-sdk -prebuilt-module-cache-path %t/new-dir/prebuilt-cache -module-cache-path %t/MCP -emit-dependencies-path %t/dummy.d -track-system-dependencies %s
|
||||
// RUN: %target-swift-frontend -typecheck -I %t/my-new-sdk -sdk %t/my-new-sdk -prebuilt-module-cache-path %t/new-dir/prebuilt-cache -module-cache-path %t/MCP -emit-dependencies-path %t/dummy.d -track-system-dependencies -emit-loaded-module-trace-path %t/trace.json %s
|
||||
//
|
||||
// Check SdkLib and ExportedLib are in the module cache
|
||||
// RUN: test -f %t/MCP/SdkLib-*.swiftmodule
|
||||
@@ -136,6 +152,10 @@
|
||||
// RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPFILE-NEGATIVE
|
||||
// RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPFILE
|
||||
//
|
||||
// Check we didn't emit anything from the cache in the trace file either
|
||||
// RUN: cat %t/trace.json | %FileCheck %s -check-prefix=TRACEFILE-NEGATIVE
|
||||
// RUN: cat %t/trace.json | %FileCheck %s -check-prefix=TRACEFILE
|
||||
//
|
||||
// RUN: %empty-directory(%t/MCP)
|
||||
// RUN: echo '4: PASSED'
|
||||
|
||||
@@ -143,7 +163,7 @@
|
||||
// 5) Now change the SDK's content and check it no longer uses the prebuilt modules
|
||||
//
|
||||
// RUN: echo "// size change" >> %t/my-new-sdk/SdkLib.swiftinterface
|
||||
// RUN: %target-swift-frontend -typecheck -I %t/my-new-sdk -sdk %t/my-new-sdk -prebuilt-module-cache-path %t/new-dir/prebuilt-cache -module-cache-path %t/MCP -emit-dependencies-path %t/dummy.d -track-system-dependencies %s
|
||||
// RUN: %target-swift-frontend -typecheck -I %t/my-new-sdk -sdk %t/my-new-sdk -prebuilt-module-cache-path %t/new-dir/prebuilt-cache -module-cache-path %t/MCP -emit-dependencies-path %t/dummy.d -track-system-dependencies -emit-loaded-module-trace-path %t/trace.json %s
|
||||
//
|
||||
// Check SDKLib and ExportedLib are in the module cache
|
||||
// RUN: test -f %t/MCP/SdkLib-*.swiftmodule
|
||||
@@ -181,6 +201,10 @@
|
||||
// RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPFILE-NEGATIVE
|
||||
// RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPFILE
|
||||
//
|
||||
// Check we didn't emit anything from the cache in the trace file either
|
||||
// RUN: cat %t/trace.json | %FileCheck %s -check-prefix=TRACEFILE-NEGATIVE
|
||||
// RUN: cat %t/trace.json | %FileCheck %s -check-prefix=TRACEFILE
|
||||
//
|
||||
// RUN: echo '5: PASSED'
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user