mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Teach scanner to respect the working directory set in the invocation through scanner C API. Also add test infrastructure to testing scanner from C API. Break up DependencyScan lib into two so the swift-scan-test and remain small without understanding swift AST. rdar://127626011
25 lines
1.1 KiB
Swift
25 lines
1.1 KiB
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: split-file %s %t
|
|
|
|
// RUN: %target-swift-frontend -emit-module -module-name A -o %t/include/A.swiftmodule -swift-version 5 \
|
|
// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \
|
|
// RUN: -emit-module-interface-path %t/include/A.swiftinterface -enable-library-evolution -I %t/internal -enable-testing \
|
|
// RUN: %t/A.swift
|
|
|
|
// RUN: %swift-scan-test -action scan_dependency -cwd %t -- %target-swift-frontend -emit-module -module-name Test \
|
|
// RUN: -swift-version 5 -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \
|
|
// RUN: -I include %t/test.swift | %FileCheck %s
|
|
|
|
// CHECK: "mainModuleName": "Test"
|
|
|
|
// RUN: cd %t
|
|
// RUN: %swift-scan-test -action scan_dependency -- %target-swift-frontend -emit-module -module-name Test \
|
|
// RUN: -swift-version 5 -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \
|
|
// RUN: -I include %t/test.swift | %FileCheck %s
|
|
|
|
//--- test.swift
|
|
import A
|
|
|
|
//--- A.swift
|
|
public func a() {}
|