mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
swift-symbolgraph-extract: Fix -target inference test.
Only test `-target` inference in CI configurations that are not cross-compiling. Resolves rdar://156991775.
This commit is contained in:
@@ -4,11 +4,6 @@
|
||||
// RUN: %target-swift-symbolgraph-extract -module-name Basic -I %t -pretty-print -output-dir %t/Output
|
||||
// RUN: %FileCheck %s --input-file %t/Output/Basic.symbols.json
|
||||
|
||||
// Verify that -target can be inferred
|
||||
// RUN: %empty-directory(%t/Output)
|
||||
// RUN: %swift-symbolgraph-extract -module-name Basic -I %t -pretty-print -output-dir %t/Output
|
||||
// RUN: %FileCheck %s --input-file %t/Output/Basic.symbols.json
|
||||
|
||||
public struct S {
|
||||
public var x: Int
|
||||
}
|
||||
|
||||
19
test/SymbolGraph/infer-target.swift
Normal file
19
test/SymbolGraph/infer-target.swift
Normal file
@@ -0,0 +1,19 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %empty-directory(%t/Output)
|
||||
// RUN: %target-build-swift %s -module-name Basic -emit-module -emit-module-path %t/
|
||||
|
||||
// Verify that -target can be inferred
|
||||
// RUN: %empty-directory(%t/Output)
|
||||
// RUN: %swift-symbolgraph-extract -module-name Basic -I %t -pretty-print -output-dir %t/Output
|
||||
// RUN: %FileCheck %s --input-file %t/Output/Basic.symbols.json
|
||||
|
||||
// This test can only work for test configurations that aren't cross-compiling.
|
||||
// REQUIRES: OS=macosx || OS=linux-gnu || OS=windows-msvc
|
||||
|
||||
public struct S {
|
||||
public var x: Int
|
||||
}
|
||||
|
||||
// CHECK: "kind": "memberOf"
|
||||
// CHECK-NEXT: "source": "s:5Basic1SV1xSivp"
|
||||
// CHECK-NEXT: "target": "s:5Basic1SV"
|
||||
Reference in New Issue
Block a user