Commit Graph

26 Commits

Author SHA1 Message Date
Doug Gregor
5462c0a8ef Ensure that the host library path is provided to tests.
Eliminate the "copy the plugin library" step for these tests, which was
always a hack and doesn't scale when we add more shared libraries.
2022-11-30 13:54:58 -08:00
Doug Gregor
70323dd318 Link _CompilerPluginSupport into the compiler and SourceKit.
Ensure that we link `swift_CompilerPluginSupport` into the compiler and
SourceKit, and set the rpath appropriately to find the library in its
installed location.

A number of driver tests copy the driver executable into a temporary
directory to isolate it from the build tree. Also copy the plugin
support library into its appropriate place near the driver executable
to ensure these tests keep working. To help with this, add a
`swift_swift_parser` lit feature, which we can use in tests that
involve the new parser's capabilities.
2022-11-15 19:32:20 -08:00
Andrew Trick
c30ca69b78 Remove lit --param bootstrapping_mode 2022-11-09 09:10:46 -08:00
Erik Eckstein
3d33f11e6c cmake/build-script: rename the libswift option to "bootstrapping"
In cmake, rename LIBSWIFT_BUILD_MODE to BOOTSTRAPPING_MODE.
Also, rename the lit feature "libswift" to "swift_in_compiler".
2021-12-22 11:31:52 +01:00
Erik Eckstein
af71088d29 libswift: bootstrapping build
Adding build modes for libswift: off, hosttools, bootstrapping, bootstrapping-with-hostlibs
The two bootstrapping modes are new. For details see libswift/README.md
2021-09-28 18:51:42 +02:00
Rajagopalan-Gangadharan
82665ccd6f Add space test case to repl tests 2021-08-05 00:21:35 +05:30
Doug Gregor
480c631209 Linux-specific fixes for the swift-frontend rename.
Hardlinking to a symlink is not permitted, so use "swift-frontend"
instead of "swift" as the hard-link target.

Also, update one Linux-specific test to check for swift-frontend.
2020-06-23 13:17:26 -07:00
Daniel Rodríguez Troitiño
70b1d91315 [windows] Allow EXE and exe capitalizations in tests.
Clang 8 or 9 seems to have changed from EXE to exe. Allow both
capitalizations (which is not important in Windows) as a workaround.

Maybe in the future we can remove the uppercase option.
2019-10-03 11:09:03 -07:00
Gwen Mittertreiner
8a6d28c7d0 Fix the Rest of the Windows Driver Tests 2019-03-06 14:23:49 -08:00
Jason Mittertreiner
4e0b092fbe Fixing Driver tests on Windows (#20209) 2018-12-10 18:27:37 -08:00
Jordan Rose
98949efe93 [test] Tweak tests to not depend on the host stdlib or SDK (#12423)
Otherwise, we get into trouble when only building iOS libraries and
then running tests (on macOS).

rdar://problem/33971531&33971705
2017-10-13 17:22:40 -07:00
Robert Widmann
e778c8c16a Update driver test using invalid identifier 2017-06-14 11:22:04 -07:00
Jordan Rose
19e09c7b3e [Driver] Don't pass a target triple to the REPL or immediate mode. (#6430)
LLDB will automatically pick the host OS if no target is passed; a
later commit will teach immediate mode to do the same thing. For now,
they default to the same triple the Driver did in the past, which is
x86_64-apple-macosx10.9 on macOS and an arbitrary unversioned triple
compatible with the host elsewhere.

Part of rdar://problem/29433205.
2016-12-21 12:54:56 -08:00
Chris Bieneman
0a20774f8b Fix swift tests to work with in-tree LLDB
Several of the swift repl tests assume that lldb does not exist next to the swift driver in the binary directory. This patch updates the tests to remove that assumption. This allows the swift tests to correctly pass if LLDB is built in-tree.

These tests are all checking for invocations of the legacy swift repl. If LLDB is in the directory next to swift they fail because it instead invokes the LLDB repl. This patch makes the tests pass by hard linking the swift driver into a temp directory before running those tests so that swift doesn't find LLDB sitting next to itself.
2016-09-25 22:16:14 -07:00
Dave Abrahams
a073d4a3f2 [testing] Support separate Output/ device
Hardlinking across distinct disks doesn't work, so copy as a fallback.
2016-09-12 19:42:56 -07:00
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Jordan Rose
213716f540 [Driver] Make relative path search cheaper on non-Darwin.
...and fix the test to not test toolchain-based search on non-Darwin.

Swift SVN r31565
2015-08-29 00:13:05 +00:00
Jordan Rose
de2ecbb80e [Driver] Remove the notion of Tools, turn ToolChain into an Action visitor.
The "Tool" abstraction wasn't buying us enough to deserve the added
complexity. Now a ToolChain turns Actions into Jobs, and every helper
tool is searched for relative to Swift first. Much simpler.

Swift SVN r31563
2015-08-28 23:12:33 +00:00
Jordan Rose
14a2909cab Pass -L, -l, and -framework to REPL and interpret mode jobs.
...and then honor them.

While here, make -l a little more flexible (see interpret_with_options test).

rdar://problem/17830826, which unblocks the LLDB feature for the same.

Swift SVN r24033
2014-12-19 17:33:03 +00:00
Jordan Rose
49a6c8eb7b Do all target info management in Clang, and drop -target-abi / -target-feature.
Previously we hardcoded a few important default CPUs, ABIs, and features into
Swift's driver, duplicating work in Clang. Now that we're using Clang's
driver to create the Clang "sub-compiler", we can delegate this work to Clang.

As part of this, I've dropped the options for -target-abi (which was a
frontend-only option anyway) and -target-feature (which was a hidden driver
option and is a frontend-only option in /Clang/). We can revisit this later
if it becomes interesting. I left in -target-cpu, which is now mapped
directly to Clang's -mcpu=.

Swift SVN r22449
2014-10-01 23:55:40 +00:00
Jordan Rose
1d8c75ede1 [test] Fix driver tests to handle spaces in the path to Xcode.
Commands like 'ld' are picked up from the path, which can result in picking
the binaries inside Xcode.

Swift SVN r21749
2014-09-05 22:22:41 +00:00
Jordan Rose
e3261af695 [Driver] Don't pass -module-name to the LLDB REPL.
The LLDB REPL doesn't guarantee any particular module name, and in particular
it currently uses multiple modules to handle redefinitions.

<rdar://problem/17918172>

Swift SVN r21303
2014-08-20 01:41:17 +00:00
Ben Langmuir
d197964680 Rename -integrated-repl to -deprecated-integrated-repl
Swift SVN r20781
2014-07-30 22:09:37 +00:00
Jordan Rose
780c6bd87a [Driver] Turn on the LLDB REPL by default!
You can use -integrated-repl to access the previous REPL implementation.

<rdar://problem/16776719>

Swift SVN r18084
2014-05-14 23:23:16 +00:00
Ted Kremenek
fad874708e Adjust test cases.
Swift SVN r17964
2014-05-12 22:01:52 +00:00
Greg Parker
25445d2dff [test] iOS-ify most remaining tests.
Tests that still aren't iOS-safe but should be are all marked `FIXME: iOS`.


Swift SVN r13625
2014-02-07 04:42:51 +00:00