Skip to content

Commit df1356a

Browse files
committed
[test] Reenable the stdlib ABI checker in PR tests
The asserts test currently requires array_cow_checks, but that feature isn't enabled by default during PR tests. rdar://88153292
1 parent 1275e62 commit df1356a

File tree

2 files changed

+69
-4
lines changed

2 files changed

+69
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// RUN: %empty-directory(%t.tmp)
2+
// mkdir %t.tmp/module-cache && mkdir %t.tmp/dummy.sdk
3+
// RUN: %api-digester -diagnose-sdk -module Swift -o %t.tmp/changes.txt -module-cache-path %t.tmp/module-cache -sdk %t.tmp/dummy.sdk -abi -avoid-location
4+
// RUN: %clang -E -P -x c %S/stability-stdlib-abi-without-asserts.test -o - > %t.tmp/stability-stdlib-abi.swift.expected
5+
// RUN: %clang -E -P -x c %S/stability-stdlib-abi-with-asserts.test -o - >> %t.tmp/stability-stdlib-abi.swift.expected
6+
// RUN: %clang -E -P -x c %S/stability-stdlib-abi-with-array-cow-checks.test -o - >> %t.tmp/stability-stdlib-abi.swift.expected
7+
// RUN: %clang -E -P -x c %t.tmp/stability-stdlib-abi.swift.expected -o - | sed '/^\s*$/d' | sort > %t.tmp/stability-stdlib-abi.swift.expected.sorted
8+
// RUN: %clang -E -P -x c %t.tmp/changes.txt -o - | sed -E -e '/^\s*$/d' -e 's/ in _[0-9A-F]{32}/ in #UNSTABLE ID#/g' | sort > %t.tmp/changes.txt.tmp
9+
// RUN: diff -u %t.tmp/stability-stdlib-abi.swift.expected.sorted %t.tmp/changes.txt.tmp
10+
11+
// *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment below.)
12+
13+
// Welcome, Build Wrangler!
14+
//
15+
// This file lists APIs that are unique to stdlib builds with array_cow_checks.
16+
// (It is combined with the stability-stdlib-abi-without-asserts.test and
17+
// stability-stdlib-abi-with-asserts.test files to generate a full list of
18+
// potentially breaking API changes. In most cases you'll want to edit that file
19+
// instead of this one.)
20+
//
21+
// A failure in this test indicates that there is a potential breaking change in
22+
// the Standard Library. If you observe a failure outside of a PR test, please
23+
// reach out to the Standard Library team directly to make sure this gets
24+
// resolved quickly! If your own PR fails in this test, you probably have an
25+
// ABI- or source-breaking change in your commits. Please go and fix it.
26+
//
27+
// Please DO NOT DISABLE THIS TEST. In addition to ignoring the current set of
28+
// ABI breaks, XFAILing this test also silences any future ABI breaks that may
29+
// land on this branch, which simply generates extra work for the next person
30+
// that picks up the mess.
31+
//
32+
// Instead of disabling this test, consider extending the list of expected
33+
// changes at the bottom. (You'll also need to do this if your own PR triggers
34+
// false positives, or if you have special permission to break things.) You can
35+
// find a diff of what needs to be added in the output of the failed test run.
36+
// The order of lines doesn't matter, and you can also include comments to refer
37+
// to any bugs you filed. Remember that in almost all cases you'll want to edit
38+
// the stability-stdlib-abi-without-asserts.test file instead of this one.
39+
//
40+
// Thank you for your help ensuring the stdlib remains compatible with its past!
41+
// -- Your friendly stdlib engineers
42+
43+
// REQUIRES: swift_stdlib_asserts
44+
// REQUIRES: array_cow_checks
45+
46+
// *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment above.)
47+
48+
// SR-13362
49+
// We currently only have a baseline for Intel CPUs on macOS.
50+
// REQUIRES: OS=macosx
51+
// REQUIRES: CPU=x86_64
52+
53+
// The digester can incorrectly register a generic signature change when
54+
// declarations are shuffled. rdar://problem/46618883
55+
// UNSUPPORTED: swift_evolve
56+
57+
// *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment above.)
58+
59+
// Note: normally you'll need to add new entries to
60+
// `stability-stdlib-abi-without-asserts.test`, not this file.
61+
Func _COWChecksEnabled() is a new API without @available attribute
62+
Func _swift_isImmutableCOWBuffer(_:) is a new API without @available attribute
63+
Func _swift_setImmutableCOWBuffer(_:_:) is a new API without @available attribute
64+
65+
// *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment above.)

test/api-digester/stability-stdlib-abi-with-asserts.test

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
// Thank you for your help ensuring the stdlib remains compatible with its past!
3939
// -- Your friendly stdlib engineers
4040

41-
// REQUIRES: swift_stdlib_asserts, array_cow_checks
41+
// REQUIRES: swift_stdlib_asserts
42+
// UNSUPPORTED: array_cow_checks
4243

4344
// *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment above.)
4445

@@ -53,15 +54,14 @@
5354

5455
// *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment above.)
5556

57+
// Note: normally you'll need to add new entries to
58+
// `stability-stdlib-abi-without-asserts.test`, not this file.
5659
Func _collectReferencesInsideObject(_:) is a new API without @available attribute
5760
Func _loadDestroyTLSCounter() is a new API without @available attribute
5861
Func _measureRuntimeFunctionCountersDiffs(objects:_:) is a new API without @available attribute
5962
Protocol _RuntimeFunctionCountersStats is a new API without @available attribute
6063
Struct _GlobalRuntimeFunctionCountersState is a new API without @available attribute
6164
Struct _ObjectRuntimeFunctionCountersState is a new API without @available attribute
6265
Struct _RuntimeFunctionCounters is a new API without @available attribute
63-
Func _COWChecksEnabled() is a new API without @available attribute
64-
Func _swift_isImmutableCOWBuffer(_:) is a new API without @available attribute
65-
Func _swift_setImmutableCOWBuffer(_:_:) is a new API without @available attribute
6666

6767
// *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment above.)

0 commit comments

Comments
 (0)