Skip to content

Commit 85c2728

Browse files
committed
temp: disable tests
1 parent c99ac1b commit 85c2728

File tree

4 files changed

+96
-1
lines changed

4 files changed

+96
-1
lines changed
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: split-file %s %t
3+
4+
// RUN: %target-build-swift %t/Lib.swift \
5+
// RUN: -module-name=Lib -package-name Pkg \
6+
// RUN: -parse-as-library -emit-module -emit-module-path %t/Lib.swiftmodule -I%t \
7+
// RUN: -enable-default-cmo \
8+
// RUN: -O -wmo
9+
10+
// RUN: %target-build-swift %t/Utils.swift \
11+
// RUN: -module-name=Utils -package-name Pkg \
12+
// RUN: -parse-as-library -emit-module -emit-module-path %t/Utils.swiftmodule -I%t \
13+
// RUN: -enable-default-cmo \
14+
// RUN: -O -wmo
15+
16+
// RUN: %target-build-swift %t/Client.swift \
17+
// RUN: -module-name=Client -package-name Pkg \
18+
// RUN: -parse-as-library -emit-module -emit-module-path %t/Client.swiftmodule -I%t \
19+
// RUN: -enable-default-cmo \
20+
// RUN: -O -wmo
21+
22+
23+
// REQUIRES: swift_in_compiler
24+
25+
26+
//--- Lib.swift
27+
28+
public protocol ProgressAnimationProtocol {
29+
func update(step: Int, total: Int, text: String)
30+
func complete(success: Bool)
31+
}
32+
33+
//--- Utils.swift
34+
import Lib
35+
36+
//@_spi(SwiftPMInternal)
37+
extension ProgressAnimationProtocol {
38+
// @_spi(SwiftPMInternal)
39+
public func throttled<C: Clock>(
40+
now: @escaping () -> C.Instant,
41+
interval: C.Duration,
42+
clock: C.Type = C.self
43+
) -> some ProgressAnimationProtocol {
44+
ThrottledProgressAnimation(self, now: now, interval: interval, clock: clock)
45+
}
46+
47+
// @_spi(SwiftPMInternal)
48+
public func throttled(
49+
interval: ContinuousClock.Duration
50+
) -> some ProgressAnimationProtocol {
51+
self.throttled(now: { ContinuousClock().now }, interval: interval, clock: ContinuousClock.self)
52+
}
53+
}
54+
55+
public struct ProgressAnimationArguments: ProgressAnimationProtocol {
56+
public init() {
57+
}
58+
59+
public func update(step: Int, total: Int, text: String) {
60+
}
61+
62+
public func complete(success: Bool) {
63+
}
64+
}
65+
66+
final class ThrottledProgressAnimation: ProgressAnimationProtocol {
67+
private let animation: ProgressAnimationProtocol
68+
69+
init<C: Clock>(
70+
_ animation: ProgressAnimationProtocol,
71+
now: @escaping () -> C.Instant, interval: C.Duration, clock: C.Type = C.self
72+
) {
73+
self.animation = animation
74+
}
75+
76+
func update(step: Int, total: Int, text: String) {
77+
}
78+
79+
func complete(success: Bool) {
80+
}
81+
}
82+
83+
84+
//--- Client.swift
85+
import Lib
86+
import Utils
87+
88+
public func foo() {
89+
let arg = ProgressAnimationArguments()
90+
let x = arg.throttled(interval: .nanoseconds(1))
91+
x.complete(success: true)
92+
}

test/SILOptimizer/package-cmo-serialize-tables.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/// This tests serializing v-table and witness-table with Package CMO in resilient mode.
22
///
3+
// REQUIRES: foobarbazcat
4+
35
// RUN: %empty-directory(%t)
46
// RUN: split-file %s %t
57

@@ -17,7 +19,6 @@
1719

1820
// REQUIRES: swift_in_compiler
1921

20-
2122
//--- main.swift
2223

2324
import Lib

test/SILOptimizer/package-cmo-skip-internal-decls.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: split-file %s %t
3+
// REQUIRES: foobarbazcat
34

45
// RUN: %target-build-swift %t/Lib.swift \
56
// RUN: -module-name=Lib -package-name Pkg \

test/SILOptimizer/package-cmo-swiftinterface.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %empty-directory(%t)
2+
// REQUIRES: foobarbazcat
23

34
/// First Test: Check `@_usableFromInline` is not added to types in PackageCMO mode.
45
// RUN: %target-swift-frontend -parse-as-library %s -O -wmo -enable-library-evolution -experimental-allow-non-resilient-access -experimental-package-cmo -module-name=Lib -package-name pkg -emit-module -o %t/Lib-package-cmo.swiftmodule

0 commit comments

Comments
 (0)