Commit Graph

12 Commits

Author SHA1 Message Date
Finagolfin
a99b3748fe [android] Update tests to use new Android overlay and disable stdlib/Glibc.swift 2024-05-28 13:01:25 -07:00
Karoy Lorentey
1a051719e3 [runtime] Adjust file/line information in fatal error messages to follow diagnostic conventions
In debug configurations, fatal error messages include file & line number information. This update presents this information in a format matching the diagnostic conventions used by the compiler, which can be a slight productivity boost.

Code compiled with optimizations enabled (which is most production code) does not output this information, so it isn’t affected by this change.

Original format:

    Fatal error: A suffusion of yellow: file calc.swift, line 5

New format:

    calc.swift:5: Fatal error: A suffusion of yellow

Resolves rdar://68484891
2020-11-10 13:23:21 -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
Harlan Haskins
fbce6e7873 [StdlibUnittest] Allow tests to require a new process
When testing runtime lookup changes, we want to make sure each test runs in isolation. Add a new modifier, `.requireOwnProcess()`, to enable tests to guarantee they’re run in isolation.
2019-03-17 17:29:36 -07:00
Daniel Rodríguez Troitiño
d08b46c47e [tests] Standarize the checks for Darwin, Glibc and MSVCRT.
Different tests used different os checks for importing Darwin, Glibc and
MSVCRT. This commit use the same pattern for importing those libraries,
in order to avoid the #else branches of the incorrect patterns to be
applied to the wrong platform. This was very normal for Android, which
normally should follow the Linux branches, but sometimes was trying to
import Darwin or not importing anything.

The standarized pattern imports Darwin for macOS, iOS, tvOS and watchOS.
It imports Glibc for Linux, FreeBSD, PS4, Android, Cygwin and Haiku; and
imports MSVCRT for Windows. If a new platform is introduced, the else
branch will report an error, so the new platform can be added to one of
the branches (or maybe add a new specific branch).

In some cases  the standard pattern was modified because some test required
it (importing extra modules, or extra type aliases), and in some other
cases some branches were removed because the test will not have used
them (but it is not exhaustive, so there might be some unnecessary
branches).

This should, at least, fix three tests for Android (the three
dynamic_replacement*.swift ones).
2019-02-06 10:51:55 -08:00
Kuba (Brecka) Mracek
d03a575279 Unify the capitalization across all user-visible error messages (#11599)
* Unify the capitalization across all user-visible error messages (fatal errors, assertion failures, precondition failures) produced by the runtime, standard library and the compiler.

* Update some more tests to the new expectations.
2017-08-29 12:16:04 -07:00
Maxim Moiseev
16eb32f539 [validation-test] Marking a few stdlibunittest validation tests as unsupported on watchos (#7731) 2017-02-24 13:44:32 -08:00
Han Sangjin
a8dec7fa43 [stdlib] Fixed for Cygwin
- CYGWIN symbol is used to distinguish Cygwin environment from other OS
  and other environment in Windows.
- Added windows and windowsCygnus to OSVersion in StdlibUnittest
2017-01-17 02:31:16 +09:00
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Saleem Abdulrasool
83901998c9 Port for PS4
Add support for the PS4 OS.  Update the standard library and add a target unit
test.
2016-06-30 20:14:50 -07:00
Brian Gesiak
b946d69112 [validation-test] Expand Glibc import check
Glibc needs to be imported on all non-Darwin platforms.
Besides Linux, this includes FreeBSD and Android as well.
2016-06-07 11:39:15 -04:00
Dmitri Gribenko
9574d03dfa StdlibUnittest: ask the child process to terminate, and check its termination status
If a child process crashes outside of a test context, the parent process
should signal test failure. This behavior is a sign of something bad
happening in the child (for example, memory corruption), and should not
go unnoticed.
2016-05-22 17:17:16 -07:00