mirror of
https://github.com/apple/swift.git
synced 2026-02-27 18:26:24 +01:00
This reverts commit e60ae24052 and fix
non-deterministic failures introduced by the commit.
Fix two issues when attempting to testing parallel scanning using
`swift-scan-test` tools:
* Make sure the BumpPtrAllocator in ScanningService is thread-safe so
there are no race condition when a new slab is allocated.
* Make sure the output of `swift-scan-test` only written from one
thread. This prevents some race conditions when writing to the same
raw_fd_ostream.
rdar://167760262
32 lines
1.2 KiB
Swift
32 lines
1.2 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 -I %t/include
|
|
|
|
// 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 -threads 2 -- %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
|
|
import B
|
|
public func a() {}
|
|
|
|
//--- include/module.modulemap
|
|
module B { header "B.h" export *}
|
|
|
|
//--- include/B.h
|
|
void b(void);
|