Commit graph

2483 commits

Author SHA1 Message Date
Andrew Schwartzmeyer
7e65fa448e Mark as pending Travis CI OS X failing tests
These tests *do not* fail locally, nor on the Linux test runner. They do
not fail when accessing the OS X runner under debug mode. The *only*
cause is the lack of a TTY on the OS X runner, which is a Travis CI
regression. Moreover, the formatting tests do not fail when the TTY is
removed locally.

These absolutely should be fixed at some point, but it is not worth
spending any more time on it.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
44028f0da3 Fix formatting and output when stdout is redirected 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
fa86c89925 Enable pre and post write in WriteToConsole 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
800fa4ca18 Remove env key from OS X build
`Start-PSBootstrap` takes care of this.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
d1c2a2c896 Disable Set-PSDebug tests on AppVeyor
These pass locally, just not with AppVeyor's host.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
2712cead34 Use Pending for tests that shouldn't be Skipped 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
fe5328006d Fix Import-Alias tests 2016-05-17 13:28:44 -07:00
Andy Schwartzmeyer
2fdf48165a Clean up Set-PSDebug tests 2016-05-17 13:28:44 -07:00
Andy Schwartzmeyer
6cd7804fb0 Mark redirected input test as pending on Windows
While this passes on Linux, it does not pass on Windows, indicating a
platform-specific bug in .NET Core.
2016-05-17 13:28:44 -07:00
Andy Schwartzmeyer
fbc794b933 Guard BufferSize for improper terminals 2016-05-17 13:28:44 -07:00
Andy Schwartzmeyer
86e8673826 Don't build more unused code
This code is all used for reading secure strings, which we don't yet
support.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
0dc549ecac Use -noninteractive on AppVeyor 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
6d7b6a10f6 Skip complex prompting tests
Not supported with non-PSReadLine Open PowerShell host.
2016-05-17 13:28:44 -07:00
Jason Shirk
8c97fd16cd Add ConsoleHost tests 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
aa8dc7c901 Use -noprofile on AppVeyor 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
e387961c31 Add -noprofile to Start-PSPester 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
7f491beabb Fix AppVeyor to use Get-PSOutput
Instead of hard-coded paths.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
c3eaf9a77e Mark as pending tests not working with ConsoleHost 2016-05-17 13:28:44 -07:00
Jason Shirk
533a5e3225 Import System.Console In/Out/Error stream changes
Thanks Jason.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
eee564e465 Delete deprecated CoreConsoleHost project 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
97ea9308fb Add readme to src/powershell 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
6d3c42a0b0 Migrate profile 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
1a61837c07 Migrate CoreConsoleHost/Modules
And update mapping.json
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
630eb69c7c Add managed entrance for powershell project
The powershell project's `Main` function initializes the custom
`AssemblyLoadContext` and then delegates to `UnmanagedPSEntry.Start`.
This lets us undo several changes to the `ConsoleHost` managed
entry (notably, the `Start` function signature does not have to change,
thus the `consoleFilePath` variable still exists).
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
a1a722c4a1 Add powershell project shim
The `src/powershell` project builds Core PowerShell as a .NET CLI app,
with a dependency on `Microsoft.PowerShell.ConsoleHost`, so that the
latter can remain a library.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
72b763a7e1 Fix ConsoleHost on Windows CoreCLR build 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
7f9052c1c6 Remove platform tests
This is pointless to test as the .NET Code better be correct, or we have
worse problems.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
7c80035d35 Skip xUnit tests not yet ported to OS X 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
0012fa90d6 Remove deprecated Listener tests 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
4234b3db73 Remove CoreConsoleHost from xUnit tests 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
fc9aa4cd88 Make ConsoleHost internals visible to powershell-tests 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
658f3e0d48 Update xUnit project to use ConsoleHost 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
8435ed758c Fix PSReadLine for net451 build
Needed System.Windows.Forms
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
5c0d17e3a2 Update ConsoleHost tests 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
dca17ac0f7 Migrate ConsoleHost tests 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
d8b2d1fb0e Fix command-line parser to support --parameters 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
c4bfc52c76 Migrate ConsoleHost .gitignore 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
849ea50ab7 Load PSReadLine by correct name
Linux is case-sensitive, so the modules are too.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
78dd93c1ac Build PSReadLine for ConsoleHost 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
2e71a090e7 Use ~/.powershell for ConsoleHost profile on Linux 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
8af7d5f344 Guard use of ConsoleControl in ConsoleHostRawUserInterface
This uses the RawUserInterface implementation from the original
CoreConsoleHost.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
02e9f100d2 Guard use of ConsoleControl in ConsoleHostUserInterface 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
702082f597 Guard use of ConsoleControl in ConsoleHost 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
3cd0d75278 Don't build ConsoleControl 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
602c7c39fc Don't build EngineInstaller 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
04f551fe91 Don't build MshHostMshSnapin 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
8021247b43 Guard AmsiUtils in SessionState Init 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
2f73af53df Remove native host dependency for ConsoleHost
When Open PowerShell is built (as .NET Core project), `OPEN` is defined.
The `Start` function normally used as the entry point from PowerShell's
custom native host is instead the real `Main` entry point of the
program, so it can be launched from the `dotnet` host.

Because Core PowerShell depends on the native host to setup the custom
assembly load context, we do it here in managed code immediately on
start-up.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
6f425d0ffd Make ConsoleHost deploy profiles and native libraries 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer
2d2d58cb23 Make ConsoleHost/AssemblyInfo portable 2016-05-17 13:28:44 -07:00