* Rebase onto .NET Core 1.1 Modify `Build.psm1` and `project.json` files to use .NET Core 1.1. .NET Core 1.1 ships with an older dotnet/cli than has currently been used, so we revert to use case-sensitive directory names for dependencies. .NET Core 1.1 is a pre-requisite for supporting Fedora 24. * PSReadLine: Bump major version of PSReadline to 6.0.0-* * Microsoft.PowerShell.Commands.Utility: Bump major version of Microsoft.CodeAnalysis.Csharp * Microsoft.PowerShell.SDK: Revert attempt to import netcoreapp1.1 instead of dnxcore * build.psm1: Restore ability to specify version of dotnet-install.sh |
||
---|---|---|
.. | ||
fixture_AssemblyLoadContext.cs | ||
project.json | ||
README.md | ||
test_Binders.cs | ||
test_CorePsExtensions.cs | ||
test_CorePsPlatform.cs | ||
test_ExtensionMethods.cs | ||
test_FileSystemProvider.cs | ||
test_MshSnapinInfo.cs | ||
test_PSVersionInfo.cs | ||
test_Runspace.cs | ||
test_SecuritySupport.cs | ||
test_SessionState.cs | ||
test_Utils.cs |
xUnit Tests
These tests are completely Linux specific.
Every test class must belong to
[Collection("AssemblyLoadContext")]
. This ensures that PowerShell's
AssemblyLoadContext is initialized before any other code is executed.
When this is not the case, late initialization fails with
System.InvalidOperationException : Binding model is already locked for the AppDomain and cannot be reset.
Having every class in the same collection is as close to an xUnit global init hook as can be done.
Running xUnit Tests
Go to the top level of the PowerShell repository and run:
Start-PSxUnit
inside a self-hosted copy of PowerShell.