Commit Graph

5570 Commits

Author SHA1 Message Date
Ben Langmuir
f68ce2d619 Add missing call to code() 2019-06-14 14:55:49 -07:00
Ben Langmuir
a200911847 Temporarily disable validation-test/stdlib/ModelIO.swift
This has been crashing sometimes in CI. Disable it until we get a real
fix.

rdar://50449570
2019-06-14 11:12:05 -07:00
Julian Lettner
3ef69d2bd3 [TSan] Remove usage of obsolete flag in tests
Cleanup usages of the flag `ignore_interceptors_accesses` is superseded
by `ignore_noninstrumented_modules`, which is on by default on all
platforms for Swift.
2019-06-13 18:52:17 -07:00
Pavel Yaskevich
6605d56781 Merge pull request #25431 from xedin/rdar-48937223
[CSApply] Don't try to transform editor placeholder if it's type is invalid
2019-06-13 16:48:50 -07:00
Pavel Yaskevich
26d0324318 [CSApply] Don't try to transform editor placeholder if it's type is invalid
CSDiag could re-typecheck closure or other expression which has editor
placeholder inside allowing type variables be bound to unresolved
type, which doesn't really form a valid solution to be applied to AST.
So we need to guard against trying to transform placeholder into a call
to `_undefined` in such case, otherwise in asserts build it's going to
crash with an assert but in release build it would crash in some other
place e.g. xSILGen or trying to type-check captures.

Resolves: rdar://problem/48937223
Resolves: rdar://problem/51599529
2019-06-13 10:55:43 -07:00
Arnold Schwaighofer
a22b4f79ec Merge pull request #25406 from aschwaighofer/enable_remaining_implicit_dynamic
Remove the remaining swift_test_mode_optimize_none_with_implicit_dynamic
2019-06-13 08:17:13 -07:00
Saleem Abdulrasool
40c98513c6 Merge pull request #25366 from compnerd/order-independence
test: make StdlibUnittest.CrashingTests pass on Windows
2019-06-12 20:23:53 -07:00
swift-ci
126f024acd Merge pull request #25410 from DougGregor/local-subs-sr9954 2019-06-12 17:45:57 -07:00
Doug Gregor
0216e3b9d3 [Type checker] Compute correct contextual substitutions for local generics.
When applying generic arguments to a local generic type within a generic
function, ensure that we correctly produce the contextual substitutions from
the generic function. Fixed with Pavel, who painstakingly tracked down
the bogus substitution.

Fixes SR-9954 / rdar://problem/48223824.
2019-06-12 16:31:32 -07:00
Arnold Schwaighofer
127b2ab939 Remove the remaining swift_test_mode_optimize_none_with_implicit_dynamic
It is expected that under enable-private-import internal/private symbols
become public. So that symbol-diffing would fail. Disable symbol diffing
under that test mode.

rdar://51304243
2019-06-12 15:54:49 -07:00
Saleem Abdulrasool
9e901eb0f8 test: fix the path separator for Evolution.test_rth
Windows uses `\` for the path separator while other targets use `/`
Use the correct seprator for calculating the basename of the executable
to enable the test on Windows.
2019-06-12 13:48:08 -07:00
Julian Lettner
9298944f0b Merge pull request #24756 from apple/tsan-positive-tests
[TSan] Add positive test for TSan + Dispatch on Linux
2019-06-11 15:39:34 -07:00
Saleem Abdulrasool
4c91a3eb60 test: make StdlibUnittest.CrashingTests pass on Windows
The output can be interleaved differently.  Accept either ordering.
2019-06-11 15:38:43 -07:00
Slava Pestov
6798eea160 Evolution: Some of these tests pass with swift_test_mode_optimize_none_with_implicit_dynamic
The remaining failures still warrant investigation.
2019-06-11 00:54:32 -07:00
Saleem Abdulrasool
fdd7fc8758 Merge pull request #25341 from compnerd/resilience-is-not-built
tests: disable backward deployment tests on Windows
2019-06-10 22:14:57 -07:00
Saleem Abdulrasool
01cf8a8dfc tests: disable backward deployment tests on Windows
PE/COFF does not support weak linking semantics.  Disable the tests
until we can emulate the required behaviour.  This will allow us to
enable running the validation test suite on Windows in the mean time.
2019-06-10 17:05:56 -07:00
Julian Lettner
1f08ed458f Wire libdispatch build path through CMake
Wire libdispatch build path through CMake `build-script-impl ->
lit.site.cfg.in -> lit.cfg` instead of computing it in lit.cfg.
2019-06-10 14:28:01 -07:00
Julian Lettner
105e4ad592 [TSan] Add positive test for TSan + Dispatch on Linux
1) Enable tests that use `import Dispatch` on Linux. Add substitution
   `%import-libdispatch` that needs to be used for all cross-platform
   tests (i.e., tests that are intended to be run on other platforms
   than Darwin) that do `import Dispatch` or enable thread sanitizer.

2) Make sure as many existing Dispatch and TSan tests as possible run on
   Linux. Mark tests that would require substantial work with
   `UNSUPPORTED: OS=linux-gnu`.

3) Add integration-style Swift test that shows that TSan finds a simple
   race when using `Dispatch.async` incorrectly. A more complete test
   suite for TSan's libdispatch support lives on the LLVM/compiler-rt
   side.

rdar://problem/49177535
2019-06-10 14:24:53 -07:00
Saleem Abdulrasool
12c7cead9d test: make the StdlibUnittest.Common pass on Windows
This adjusts the paths in the test to support the Linux and Windows path
separators.  Loosen the test to accept the interleaved stdout output on
Windows.
2019-06-10 12:25:06 -07:00
Saleem Abdulrasool
62cb79b536 Merge pull request #25213 from compnerd/standard-validation
validation-test: adjust stdlib tests for Windows
2019-06-10 11:35:04 -07:00
Luciano Almeida
bbf38c5541 Merge branch 'master' of https://github.com/apple/swift into attemp-fix-compiler-crash-28818 2019-06-10 00:14:56 -03:00
Mishal Shah
c2848e793f Merge pull request #25236 from apple/update-master-xcode-11-beta1
Update master to build with Xcode 11 beta, macOS 10.15, iOS 13, tvOS 13, and watchOS 6 SDKs
2019-06-06 11:22:40 -07:00
Saleem Abdulrasool
6f803155d7 validation-test: avoid shell in ParseableInterface.verify_all_overlays
Avoid using shell in the test as not all targets run with a POSIX shell
for the test executor.
2019-06-05 13:57:19 -07:00
swift-ci
01e7bab28c Merge pull request #25251 from compnerd/house-lit 2019-06-04 17:58:00 -07:00
Saleem Abdulrasool
655a60af4d validation-test: correct typo in ParseableInterface.verify_all_overlays
The `%{python}` substitution was typoed with the `%` sigil being
replaced with `$`.
2019-06-04 16:36:12 -07:00
Saleem Abdulrasool
a78a2988d1 Merge pull request #25244 from compnerd/independence-day
validation-test: refactor the test invocation (NFC)
2019-06-04 15:35:37 -07:00
Saleem Abdulrasool
db9a6cae4d validation-test: refactor the test invocation (NFC)
This just uses the `%target-build-swift-dylib` instead of
`%target-build-swift` substitution along with `%target-library-name` to
ensure that we are target independent.
2019-06-04 13:05:42 -07:00
Saleem Abdulrasool
551c1be926 validation-test: make stdlib.string compile on Win32
The C library functions used here do not appear without the C runtime
being imported (ucrt or MSVCRT).  Adjust the test as such.  This exposes
a stack corruption in the test which needs to be resolved.
2019-06-04 09:43:13 -07:00
Saleem Abdulrasool
c1d007a790 Merge pull request #25232 from compnerd/hash
validation-test: avoid shell in HashingRandomization
2019-06-04 08:45:42 -07:00
mishal_shah
1e38fc3030 Update master to build with Xcode 11 beta, macOS 10.15, iOS 13, tvOS 13, and watchOS 6 SDKs 2019-06-03 22:50:02 -07:00
Saleem Abdulrasool
299548deb7 validation-test: avoid shell in HashingRandomization
Split up the commands into multiple RUN lines.  Use a temporary to
actually capture the output of multiple invocations to compose them into
a single stream.

Replace the `export` usage with `env` which the lit interpreter is able
to process even on Windows.

This makes HashingRandomization pass on Windows.
2019-06-03 19:10:37 -07:00
Saleem Abdulrasool
8cb86acab5 tests: add swift_addNewDSOImage to the stubs
This is needed particularly on Windows which does not permit unresolved
symbols and the startup stub (swiftrt.obj) references the runtime
function.
2019-06-03 18:53:29 -07:00
Saleem Abdulrasool
1c41c0887c validation-test: adjust stdlib tests for Windows
The embedded shell script in the RUN command for lit is problematic for
non-sh shell environments (i.e. Windows).  This adjusts the tests to
uniformly build the code for the ObjC runtime.  However, the Objective-C
code is only built under the same circumstances that it is currently
enabled - the availability of the needed frameworks.  The empty object
on other runtimes will have no material impact.  The swift side of it
checks whether the runtime is built with ObjC interop.  This allows us
to largely use the same command line for all the targets.  The last
missing piece is that the `-fobjc-runtime` requires that we run a modern
ObjC runtime.  We enable this unconditionally in lit for the non-Apple
targets.

This improves the validation test coverage for the standard library on
Windows.
2019-06-03 08:36:22 -07:00
Saleem Abdulrasool
1e630a5969 test: plumb --triple to the resilience test helper
The resilience test helper builds up invocations of the tooling.  In
order to do this, we need to know what host we are building for.  Plumb
the value for `-triple` from the test harness into the utility.  This
will be used subsequently to enable additional testing for Windows.
2019-06-02 17:55:34 -07:00
Saleem Abdulrasool
aded0d7ede validation-tests: define the MSVC runtime to use
This variable is needed to run the validation test suite on Windows.
2019-06-02 11:24:29 -07: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
eeckstein
896a0b0fe3 Merge pull request #25154 from eeckstein/dynamic-replaceable
IRGen/runtime: change the code generation for dynamically replaceable functions
2019-05-30 20:00:57 -07:00
Ben Cohen
e9d4687e31 De-underscore @frozen, apply it to structs (#24185)
* De-underscore @frozen for enums

* Add @frozen for structs, deprecate @_fixed_layout for them

* Switch usage from _fixed_layout to frozen
2019-05-30 17:55:37 -07:00
Erik Eckstein
4fb4435d12 IRGen: add an option to disable runtime calls for dynamic replacements.
With the option -Xllvm -basic-dynamic-replacement the runtime functions are not called (so it works with an old swift library).
But calling the original of a replaced function is not supported in this case.
2019-05-30 15:28:16 -07:00
Joe Groff
2a28948a69 Merge pull request #25030 from jckarter/SR-10600-back-deploy
Introduce a backward-deployment library for SR-10600.
2019-05-29 15:02:02 -07:00
Slava Pestov
4551230a8b Sema: Remove ConformanceCheckFlags::Used 2019-05-28 22:08:31 -04:00
Luciano Almeida
2ef18488d6 Walking through the expr to set the types and type variables in the constraint system before add convertion constraint 2019-05-27 22:57:56 -03:00
Joe Groff
2a2d40d870 Driver: Link against compatibility library for deploying back to Swift 5.0 runtimes 2019-05-24 12:44:22 -07:00
Michael Gottesman
6f42934462 [test] Disable inherits_NSObject.swift on watchOS.
This was failing alongside inherits_ObjCClasses.swift (they were failing at the
same time).

Until MikeA has time to look at this disable this as well.

rdar://problem/50898688
2019-05-24 10:14:32 -07:00
David Smith
2dcd82239b Merge pull request #24874 from Catfish-Man/bulk-tests
Test foreign strings on invalid content more thoroughly
2019-05-22 16:28:23 -07:00
Mike Ash
5bcdb3c75c [Test] Disable inherits_ObjCClasses.swift on watchOS.
It's failing and it's going to take some more time to figure out why.

rdar://problem/50898688
2019-05-21 17:07:34 -04:00
Mike Ash
8c1a1dc9ff Merge pull request #24921 from mikeash/existentials-objc-test-disable-testing-os-libraries
[Test] Disable existentials_objc.swift when testing against OS libraries.
2019-05-21 11:00:56 -04:00
Mike Ash
d15a651094 [Test] Disable existentials_objc.swift when testing against OS libraries, as the 5.0 libraries don't support it.
rdar://problem/50175995
2019-05-20 15:31:25 -04:00
Jordan Rose
7963529da1 Merge pull request #24819 from jrose-apple/when-everyone-is-super-no-one-will-be
[Serialization] Drop a class if the superclass can't be found
2019-05-20 11:30:08 -07:00
Slava Pestov
865b79c516 Add regression test for fixed crasher 2019-05-17 23:08:31 -04:00