Commit Graph

17 Commits

Author SHA1 Message Date
Joe Groff
f02ba53d97 Reenable the weak reference runtime tests in weak.mm.
Instead of directly referencing a long-dead constructor from the standard library, put a purpose-built function in StdlibUnittest to feed a Swift object reference to the test C code. rdar://problem/18498737

Swift SVN r24816
2015-01-29 17:49:08 +00:00
Dmitri Hrybenko
6670bb76ec Rewrite the CMake build system
Swift SVN r24124
2014-12-23 22:15:30 +00:00
Dmitri Hrybenko
c57bde235d CMake: add a (disabled) flag for serializing StdlibUnittest
It would speed up testing if it actually worked.

Swift SVN r23175
2014-11-08 04:41:08 +00:00
Dmitri Hrybenko
96d00d70b5 StdlibUnittest: add infrastructure for race tests (see examples)
This will be used to test rdar://18191358

Swift SVN r21836
2014-09-10 11:58:45 +00:00
Dave Abrahams
06414d842e [stdlib] Add LifetimeTracked to StdlibUnitTest
Swift SVN r21603
2014-08-30 01:54:31 +00:00
Dmitri Hrybenko
3a04e0809f stdlib: add a function to squeeze a number in a given range from a hash value
This function mixes the bits in the hash value, which improves Dictionary
performance for keys with bad hashes.

PrecommitBenchmark changes with greater than 7% difference:

``````````Dictionary2`,```1456.00`,```1508.00`,```1502.00`,````624.00`,````607.00`,````592.00`,`864.00`,``145.9%
``````````Dictionary3`,```1379.00`,```1439.00`,```1408.00`,````585.00`,````567.00`,````552.00`,`827.00`,``149.8%
````````````Histogram`,````850.00`,````849.00`,````851.00`,```1053.00`,```1049.00`,```1048.00`,`199.00`,``-19.0%
````````````````Prims`,```1999.00`,```2005.00`,```2018.00`,```1734.00`,```1689.00`,```1701.00`,`310.00`,```18.4%
``````````StrSplitter`,```2365.00`,```2334.00`,```2316.00`,```1979.00`,```1997.00`,```2000.00`,`337.00`,```17.0%
```````````````TwoSum`,```1551.00`,```1568.00`,```1556.00`,```1771.00`,```1741.00`,```1716.00`,`165.00`,```-9.6%

Regressions are in benchmarks that use `Int` as dictionary key: we are just
doing more work than previously (hashing an `Int` was an identity function).

rdar://17962402


Swift SVN r21142
2014-08-12 12:02:26 +00:00
Jordan Rose
323c788c5b [CMake] Support simulator testing with the multiple-variants build.
New targets: check-swift-iphonesimulator-{i386,x86_64}. In theory this also
supports check-swift-iphoneos-{armv7,arm64}, but I didn't do any work to
support that (including even copying over what the separate-build tests do).

I'd suggest /not/ running both targets at the same time with Ninja; both
lit processes assume they can use all cores and end up contending for the
CPU and simulator.

Swift SVN r21111
2014-08-08 17:56:10 +00:00
Dmitri Hrybenko
7255f900b9 stdlib: move test for floating point conversion traps to the validation
testsuite

Fixes for traps will follow.


Swift SVN r21108
2014-08-08 15:20:05 +00:00
Dmitri Hrybenko
b3c2f0e1fe StdlibUnittest: add a dependency on Foundation overlay
Swift SVN r21107
2014-08-08 14:47:04 +00:00
Dmitri Hrybenko
f2436065db StdlibUnittest: run tests out of process
The test harness now can recover after test crashes, allowing:

- check for crashes themselves (without reporting them to the Python lit driver,
  which is about 10x slower -- even if CrashTracer is disabled);

- recover from unexpected test crashes and run the rest of the tests;

- this lays the groundwork for assertions that end the test execution, but
  allow the rest of the tests to run (rdar://17906801).

Note that we don't spawn a fresh process for every test.  We create a child
process and reuse it until it crashes.


Swift SVN r21090
2014-08-07 15:14:57 +00:00
Dmitri Hrybenko
f538edd90a Add Foundation dependency to fix the build in some configurations
Swift SVN r21069
2014-08-06 18:07:06 +00:00
Dmitri Hrybenko
ab8b14f2d5 StdlibUnittest: allow xfail and skip annotations on tests
rdar://17906092


Swift SVN r21040
2014-08-05 15:03:54 +00:00
Dmitri Hrybenko
6d4f8adbf5 stdlib/String: fix a race in _StringBuffer.grow()
rdar://17855614


Swift SVN r20960
2014-08-02 22:50:45 +00:00
Dmitri Hrybenko
8c277e35e9 StdlibUnittest: add a prototype of a Swift-based driver for trapping tests
This technique is about 10x faster than using lit as the driver.


Swift SVN r20668
2014-07-29 10:26:32 +00:00
Doug Gregor
71cd9245ba Rename swift_stdlib_core -> swiftCore and swift_runtime -> swiftRuntime.
We can't use underscores in plists, so just makes the names consistent
<rdar://problem/17652418>.

Swift SVN r19954
2014-07-14 22:19:03 +00:00
Doug Gregor
a5bde4e3a4 CMake: Add COMPILE_FLAGS support for add_swift_library.
COMPILE_FLAGS is currently used for two purposes:
  - For any target library, add the appropriate Swift optimization flags. This eliminates the add_swift_optimization_flags boilerplate and makes these flags work for all library variants
  - For the runtime, pass the appropriate define down when SWIFT_RUNTIME_CLOBBER_FREED_OBJECTS is set, so that all library variants get this setting.

Swift SVN r19444
2014-07-02 00:37:48 +00:00
Dmitri Hrybenko
4904685f8f Extract some unit testing helpers from NSStringAPI into a module
Swift SVN r18956
2014-06-17 16:25:37 +00:00