Commit Graph

10 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
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
Daniel Rodríguez Troitiño
5835cebe99 [android] Do not try to turn EOF into an UInt8
Android is one of those platforms that define the symbol EOF as a
negative number. Trying to turn it into an UInt8 will only crash the
test. Move the transformation after we have checked for EOF first. In my
opinion, in other platforms, having the EOF attached to the getline
result was also invalid, and that's probably why the two test that use
EOF were sending an extra newline.

Even with this, the tests do not pass on Android because it deadlocks
waiting for input/output from the child process, which never happens. I
haven't find why this happens, but only happens if the last test of the
suite closes stdin. I will try to fix that in another PR.
2019-04-19 17:24:45 -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
Ben Cohen
e338344bae Remove overloads that were needed pre-conditional conformance 2018-09-11 21:00:36 -07: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
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
38741f3928 [test] Add Android (and FreeBSD) to OS checks
Add Android to the OS checks used to determine whether to import Glibc.
These tests would pass on Android were it not for the fact that Android is not
included in the Glibc check.

Also add FreeBSD where missing.
2016-04-25 10:58:32 -04:00
Slava Pestov
49c54870c1 Serialization: Auto-linking recursively walks modules imported from -sil-serialize-all modules 2016-04-01 12:21:36 -07:00
Jordan Rose
40f57149f6 Move StdlibUnittest tests to their own directory.
StdlibUnittest.swift became StdlibUnittest/Common.swift;
all others just dropped the "StdlibUnittest" prefix.
2016-03-18 16:19:30 -07:00