Commit Graph

25 Commits

Author SHA1 Message Date
Alexis Laferrière
11c448d954 Tests: Use a local cache for many tests importing AppKit
Tests importing AppKit have a tendency to be flaky if they share a
module cache with other builds using a different set of framework search
flags. Make sure they use a local cache to avoid picking incompatible
cached modules.

Alternatively, we could align all builds using the same cache to have
exactly the same framework search paths or enable explicit module
builds. I picked the module cache as it's the most reliable solution in
the short and long term.

The 5 tests below import AppKit and have been known to be flaky.
Adapting them to use a custom cache with require more care. For now,
let's use them as control group to validate that the fix works. If these
5 fail without the fixed ones, we should extend the same corresponding
fix to them.

- Interpreter/SDK/GLKit.swift
- Interpreter/SDK/cf_extensions.swift
- Interpreter/SDK/cf_type_bridging.swift
- Interpreter/SDK/mapkit_header_static.swift
- Interpreter/SDK/objc_ns_enum.swift

rdar://142296731
2025-01-09 12:22:02 -08:00
Mike Ash
0d14ab01ef [Test] Remove timeout from Reflection.swift and Reflection_objc.swift.
The timeouts have a comment about ASan tests taking hours, but that comment is a decade old and that doesn't seem to be the case now. Reflection_objc.swift does take over a minute to build with an ASan compiler, but that's tolerable.

rdar://134405526
2024-10-07 16:13:34 -04:00
Ben Langmuir
081774ab07 [test] Fix stdlib/Reflection_objc.swift with newer deployment target
This test stops working with deployment targets that no longer link
@rpath/libswiftCoreGraphics.dylib when running on OSes that still
require the CoreGraphics overlay. Explicitly link it to workaround.
2024-08-30 09:10:45 -07:00
Becca Royal-Gordon
e16cf3085f Override -triple on fallback to arm64e interface
When we fall back to loading an arm64e module interface during an arm64 build, we want to compile it for the arm64 target so that it is fully compatible with the module that will load it, even though the flags in the file specify the arm64e target. Rewrite the sub-invocation's TargetTriple property in this specific situation. If the two targets differ by more than just the sub-architecture, we will continue to respect the -target flag in the file.

Fixes <rdar://83056545>.
2021-09-15 12:36:17 -07:00
Evan Wilde
ddf210b449 Disabling arm64e testing in two tests
I wasn't aware that arm64e was a thing in open-source, but these two
tests are failing on Apple Silicon both on the main branch and on the
rebranch branch, so I'm disabling it for now.

The failing tests are:
 - ModuleInterface/arm64e-fallback.swift
 - stdlib/Reflection_objc.swift
2021-09-13 13:30:50 -07:00
Mike Ash
4efb9ac0ac [Tests] Mark some tests as unsupported in back deployment testing.
These tests require a newer runtime and fail on older OSes:

   test/Concurrency/Runtime/actor_detach.swift
   test/Concurrency/Runtime/actor_init.swift
   test/Interpreter/rdar80847020.swift
   test/stdlib/Reflection_objc.swift
2021-07-28 17:49:40 -04:00
Pavel Yaskevich
791670040d [stdlib] NFC: Un-XFAIL test/stdlib/Reflection_objc.swift on arm64
Resolves: rdar://75006694
2021-06-24 09:45:12 -07:00
Alastair Houghton
02a13e71c7 Print raw values for C/C++ enums.
When printing C/C++ enum values, in lieu of having proper metadata for the enum
type, try to display a raw value (see SR-6550)

rdar://56473712
2021-06-16 14:45:50 +01:00
Robert Widmann
40f2d0db5b Disable Reflection_objc on AS Hosts
rdar://problem/75006694
2021-03-03 23:41:40 -08:00
Robert Widmann
cddf73ecdb [Gardening] Clean Up OS-Test Patterns Across The Codebase
Clean up a few general patterns that are now obviated by canImport

This aligns more generally with the cleanup that the Swift Package
Manager has already done in their automated XCTest-plumbing tool in
apple/swift-package-manager#1826.
2020-06-30 22:55:58 -07:00
Erik Eckstein
f83bd2885d tests: fix the timeout.py script and move it to a more central place
A string->float conversion for the command line argument was missing
2020-04-10 20:10:24 +02:00
Arnold Schwaighofer
b31b7a9d8e Remove some UNSUPPORTED swift_test_mode_optimize_none_with_implicit_dynamic
rdar://51228899
2019-05-31 08:45:37 -07:00
Arnold Schwaighofer
e113ef8c93 Add a mode to test implicit dynamic with private imports 2019-03-20 14:34:01 -07:00
Saleem Abdulrasool
6618ec17dd stdlib: replace shell script with python
Replace timeout.sh with timeout.py.  This makes it portable to other
platforms like Windows.
2018-12-11 17:28:39 -08:00
Stephen Canon
fb8b9e143d SIMD into stdlib
Implements SE-0229.

Also updates simd module types in the Apple SDKs to use the new types, and updates a couple tests to work with the new types and protocols.
2018-11-29 17:09:01 -05:00
Arnold Schwaighofer
2d8a1dbbfe Codesign test/stdlib 2018-08-10 06:58:40 -07:00
Joe Groff
06ac23842f IRGen: Correctly set and honor the "is reflectable" bit on structs and classes.
If we only emit an opaque reflection record for a struct or class, then we can't reflect its fields. We failed both to clear the "is reflectable" bit in the context descriptor for non-reflectable structs, and to check for the bit before trying to present a struct's fields as children in the runtime. rdar://problem/41274260
2018-07-03 13:52:46 -07:00
Sho Ikeda
b68be20e9d [test][gardening] Prefer os(macOS) over os(OSX) 2018-03-11 10:58:58 +09:00
Mike Ash
4045edf886 [Runtime] Remove old-style mirrors in ReflectionLegacy.swift.
The old-style mirrors were the basis for non-custom, reflection based Mirrors. As part of removing old-style mirrors, reflection based Mirrors are reimplemented without them. Reflection.mm is deleted and replaced with ReflectionMirror.mm, which borrows a chunk of the old code but presents a simpler API to the Swift side. ReflectionMirror.swift then uses that API to implement a reflection-based Mirror init.

rdar://problem/20356017
2018-02-16 16:05:40 -05:00
Jordan Rose
38e2cfe1e2 Mangle imported declarations using their C names.
This makes them consistent no matter what shenanigans are pulled by
the importer, particularly NS_ENUM vs. NS_OPTIONS and NS_SWIFT_NAME.

The 'NSErrorDomain' API note /nearly/ works with this, but the
synthesized error struct is still mangled as a Swift declaration,
which means it's not rename-stable. See follow-up commits.

The main place where this still falls down is NS_STRING_ENUM: when
this is applied, a typedef is imported as a unique struct, but without
it it's just a typealias for the underlying type. There's also still a
problem with synthesized conformances, which have a module mangled
into the witness table symbol even though that symbol is linkonce_odr.

rdar://problem/31616162
2018-01-09 17:55:24 -08:00
Joe Shajrawi
66d0df6bae Revert "Temporary disable failing armv7 tests"
This reverts commit 78e5e25215.
2017-08-15 13:43:57 -07:00
Joe Shajrawi
78e5e25215 Temporary disable failing armv7 tests 2017-08-08 15:22:14 -07:00
Dmitri Gribenko
486cab447d tests: replace 'rm -rf %t && mkdir -p %t' with '%empty-directory(%t)'
These changes were made using a script.
2017-06-04 11:08:39 -07:00
Dmitri Gribenko
55864d10cb Tests: use 'mkdir -p' 2016-09-02 21:36:45 -07:00
Max Moiseev
9fc37efee4 [test] renaming test/1_stdlib to just test/stdlib 2016-09-01 16:51:43 -07:00