Commit Graph

16 Commits

Author SHA1 Message Date
Yuta Saito
4c8dc5bcb8 [test] Replace obsolete single_threaded_runtime feature with threading_none
The feature was renamed in 0cf687aa2b but
validation tests were not updated at that time.
2023-10-11 18:14:43 +00:00
Kuba (Brecka) Mracek
9de7b59388 Subsume SWIFT_STDLIB_USE_NONATOMIC_RC into SWIFT_STDLIB_SINGLE_THREADED_RUNTIME (#33643) 2020-08-26 21:28:30 -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
Xi Ge
eade392422 test: xfail validation-test/StdlibUnittest/RaceTest.swift 2020-06-26 09:50:17 -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
Maxim Moiseev
ca51626fd3 [stdlib] Move _stdlib_AtomicInt and friends out of the stdlib 2018-11-06 09:53:58 -08:00
David Zarzycki
283713d61d [Testing] Formalize stress tests
Stress tests are, by definition, stressful. They intentionally burn a
lot of resources by using randomness to hopefully surface state machine
bugs. Additionally, many stress tests are multi-threaded these days and
they may attempt to use all of the available CPUs to better uncover
bugs. In isolation, this is not a problem, but the test suite as a whole
assumes that individual tests are single threaded and therefore running
multiple stress tests at once can quickly spiral out of control.

This change formalizes stress tests and then treats them like long
tests, i.e. tested via 'check-swift-all' and otherwise opt-in.

Finally, with this change, the CI build bots might need to change if
they are still only testing 'validation' instead of all of the tests.
I see three options:

1) Run all of the tests. -- There are very few long tests left these
   days, and the additional costs seems small relative to the cost of
   the whole validation test suite before this change.
2) Continue checking 'validation', now sans stress tests.
3) Check 'validation', *then* the stress tests. If the former doesn't
   pass, then there is no point in the latter, and by running the stress
   tests separately, they stand a better chance of uncovering bugs and
   not overwhelming build bot resources.
2018-03-20 21:45:28 -04:00
Mikio Takeuchi
3a46ecb7f0 Use UNSUPPORTED to skip race tests 2017-02-27 12:17:53 +09:00
Mikio Takeuchi
dfeca11403 Disable race tests if nonatomic reference counting is used 2017-02-27 12:17:53 +09:00
Greg Parker
9666d8d39a [test] Add a timeout to runRaceTest(). Use it to limit test AtomicInt.swift. (#4815)
[test] Add a timeout to runRaceTest(). Use it to limit test AtomicInt.swift.

This cuts AtomicInt.swift's execution time from several hours to
about ten minutes on slow hardware and slow build configurations.
2016-09-19 21:46:25 -07:00
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Robert Widmann
35fe7c7ad6 Cleanup validation tests after SE-0089 2016-07-28 18:01:44 -07:00
Dmitri Gribenko
227cfa1695 StdlibUnittest: add a simple API for race tests 2016-05-20 14:23:31 -07:00
Manav Gabhawala
7928140f79 [SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary 2016-04-06 20:21:58 -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