Commit Graph

16 Commits

Author SHA1 Message Date
Jordan Rose
04915c4f5a [test] Adjust tests for OS X's "System Integrity Protection".
test/Driver/environment.swift is trying to test that the driver can set
environment variables that the frontend will use, but the only environment
variables we set are ones that are blocked by OS X's "System Integrity
Protection" feature when invoking a restricted binary---such as /bin/sh.
We could compile a tiny app that calls getenv, but that's a bit heavy for
this test. Instead, just limit it to non-OS-X hosts.

test/Driver/options-interpreter.swift is testing the effect of the /user/
setting the same sensitive environment variables. In this case, we want to
make sure we're calling the Swift driver directly so that we don't run afoul
of the same limitations environment.swift was seeing.

Fixes rdar://problem/23771412 (which is just about re-enabling these tests).
2015-12-10 16:21:14 -08:00
Jordan Rose
40584f830a [test] Add a Radar to the tests I disabled in f869e9e6.
I filed this under Radar rather than bugs.swift.org because it's /only/ our
CI system that's failing, and external contributors have no insight into
that anyway. Hopefully I'll be able to get to the bottom of this soon.
2015-12-04 18:37:14 -08:00
Jordan Rose
f869e9e653 Temporarily disable tests to unblock Apple's internal CI.
Not sure why these are failing. I'll either get back to them later today
or file a proper JIRA bug.
2015-12-04 14:44:22 -08:00
Jordan Rose
4f9367041f [Driver] Always use the runtime resource library path for DYLD_LIBRARY_PATH.
...when interpreting. Otherwise, the script may depend on library X, which
depends on library Y, where library Y is a standard Swift library, located
in lib/swift/$PLATFORM/.

Finishes rdar://problem/23588774
2015-12-04 12:18:48 -08:00
Jordan Rose
8021ed0873 [Driver] Set [DY]LD_LIBRARY_PATH when building an interpreter job.
That's DYLD_LIBRARY_PATH on OS X and LD_LIBRARY_PATH on Linux for -L,
and DYLD_FRAMEWORK_PATH on OS X for -F.

Note that this commit doesn't actually include the setenv calls yet, so an
end-to-end test is coming in the next commit.

Part of rdar://problem/23588774
2015-12-04 12:18:47 -08:00
Ben Langmuir
d197964680 Rename -integrated-repl to -deprecated-integrated-repl
Swift SVN r20781
2014-07-30 22:09:37 +00:00
Ben Langmuir
fdcee9c501 Clean up the command line interface for 'swift'
In the interactive driver, disable a bunch of flags that only work with
swiftc driver (NoInteractiveOption => disallowed, doesn't show up in
help when invoked as 'swift').  Also move some options to HelpHidden
(hidden from -h in both 'swift' and 'swiftc') that we don't need to
advertise.

Swift SVN r20780
2014-07-30 22:09:28 +00:00
Ben Langmuir
920a8ff343 Make using the -i flag an error
This flag is now obsoleted by the interactive driver and simply
complicates understanding the command-line parsing. Making it an error
to force users to move also allows us to reuse the flag in the future if
we like.

Swift SVN r20641
2014-07-28 20:19:27 +00:00
Ben Langmuir
1fc40c5a2a Bring back -parse-stdlib in the interactive driver
This actually does something useful (and the frontend bits are already
being tested).  <rdar://problem/17821313>

Swift SVN r20624
2014-07-28 15:43:39 +00:00
Ben Langmuir
07a3c7cbd5 Switch to the new swift/swiftc commmand line interface
This makes the command line interface to 'swift' the same as what was
previously in 'swifti', and removes the staging symlink.

For posterity, the command line behaviour for 'swift' is now:
* `swift` -> start the repl
* `swift script.swift` -> run script.swift (the old -i mode)
* Any arguments after the input file are forwarded to the script as
  Process.arguments
* A shebang line is something like #!/usr/bin/xcrun swift

The batch compiler 'swiftc' behaves much like the old 'swift'
executable, but without the interactive bits now in 'swifti'.

<rdar://problem/17710788>

Swift SVN r20540
2014-07-25 13:28:21 +00:00
Ben Langmuir
d2ef235237 Move the lit tests over to the new swift/swiftc interfaces
Most of the tests just got moved to swiftc, but some of them were
duplicated to apply to both swiftc and swift. A handful still use the
existing 'swift' because they are for the existing '-i' syntax.

Note: this means config.swift_driver now uses the staging symlink
'swifti'. The only thing preventing us from dropping the 'i' and getting
rid of the old interface is that Xcode hasn't moved to swiftc yet
<rdar://problem/17769327>.

Swift SVN r20467
2014-07-24 04:34:10 +00:00
Ben Langmuir
afd88cab2a Add parsing support for swifti
Parse until the first input, and then collect the remaining arguments
and forward them to the script.

Swift SVN r20437
2014-07-23 22:42:05 +00:00
Ben Langmuir
a96009c52f Add a 'swifti' symlink to stage in the upcoming driver changes
For now, keep 'swift' the same and put all the interactive driver
changes under 'swifti'. When these are in good shape, I will remove
swifti and make 'swift' the interactive driver as discussed.

Swift SVN r20359
2014-07-23 02:30:39 +00:00
Ben Langmuir
8b7cc4f619 Make -i compatible with shebangs and forward arguments correctly
The driver option -i now requires an input file as argument, and any
options after the input file will be treated as arguments to the
interpretted file.

This also renames the frontend option to -interpret, since it is parsed
as a flag, unlike -i. We could support -interpret in the driver if we
wanted, which would allow us to use --, but wouldn't work with shebang
scripts. For now, it's frontend-only.

Swift SVN r19718
2014-07-09 02:37:42 +00:00
Jordan Rose
67f319b747 [Driver] Hook up -emit-dependencies option, but don't do anything with it yet.
Part of <rdar://problem/14899639>

Swift SVN r18044
2014-05-14 00:34:07 +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