Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ before_install:
- git submodule update --init -- src/windows-build src/Modules/Pester src/libpsl-native/test/googletest
- ./download.sh
script:
- ulimit -n 4096; powershell -c "Import-Module ./PowerShellGitHubDev.psm1; Start-PSBootstrap; Start-PSBuild; Start-PSPester"
- ulimit -n 4096; powershell -c "Import-Module ./PowerShellGitHubDev.psm1; Start-PSBootstrap; Start-PSBuild; Start-PSxUnit; Start-PSPester"
notifications:
slack:
secure: sKYd4n61+ZFzGZuWGUl8V1kN0NM16wRVOFVlNhlFCwnkrEsKROb++EvXf5uwnKuzxkhEjvPWO+UFgeshQDoR93y4s5YLfhC5JupK4nUzjPzWs208KTrh8u/x9MY8X6Ojxi85EEAiku5GzMoMlkucSStZUYwbIfnelzqdw8uoRwmm2MW4XCPwsuEuDUVghyiva0Mdx1G6MopCrK8T96WywJXT3chhfZQgVt+sQCBt9g+2kjDaObKrzG0P07IVK43ZpDgnu6AoxlyBzIx9mJH2Oa/tki3/kTO72Wcp3ps3qvmiStADamzVKR9p1VlWCLWAd6VOehxuByCGEyujpzk135Wud2DZYO+8LD6inZVhFe3Wt5pCU9BDXZppiATfMCqgXEH7nK54pEn79yHcjthRJ2+Z9ot7As2fu3RSBmTAi8nRP0fxRyX/jctR3S6P0qt0y1ynx9nzBfhmhPQW0PMVazWS/nruQIvK/3iiYXjZxM5bBwIvabmwV00EYeTdbL6ufXWNgQcG1ZWkDsi2I3vst/ytUbHwaFYg83bXWpxg9DCzJeWLVUvE5/3NfBxRAuCTot/fgTEA9IYScvrlL7Q/bT0cOt0vEM98MPf1UO+WP85uxhsRgHtwDEo+jMaL6ZFkPhlV6mmmED4NdY2//a571cLNXdnuMAze5O3TWGBG53g=
5 changes: 5 additions & 0 deletions PowerShellGitHubDev.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,11 @@ function Start-PSxUnit {
throw "xUnit tests are only currently supported on Linux / OS X"
}

if ($IsOSX) {
log "Not yet supported on OS X, pretending they passed..."
return
}

$Content = Split-Path -Parent (Get-PSOutput)
$Arguments = "--configuration", "Linux"
try {
Expand Down
6 changes: 4 additions & 2 deletions nuget.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
<configuration>
<packageSources>
<clear />
<add key="dotnet-core" value="https://www.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="cli-deps" value="https://dotnet.myget.org/F/cli-deps/api/v3/index.json" />
<add key="CI Builds (dotnet-core)" value="https://www.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="CI Builds (dotnet-cli)" value="https://dotnet.myget.org/F/dotnet-cli/api/v3/index.json" />
<add key="CI Builds (aspnetvnext)" value="https://www.myget.org/F/aspnetvnext/api/v3/index.json" />
<add key="CI Builds (aspnetcidev)" value="http://myget.org/F/aspnetcidev/api/v3/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="local" value="./src/windows-build/nuget-feed" />
</packageSources>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,15 @@ public static void SetPowerShellAssemblyLoadContext([MarshalAs(stringType)]strin
if (!IsInitialized)
{
var psAsmLoadContext = new PowerShellAssemblyLoadContext(basePaths);
AssemblyLoadContext.InitializeDefaultContext(psAsmLoadContext);
try
{
AssemblyLoadContext.InitializeDefaultContext(psAsmLoadContext);
}
catch (System.InvalidOperationException)
{
// We may not be able to set the default context. If we're under the
// xUnit test harness, it has already been set.
}
IsInitialized = true;
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/System.Management.Automation/utils/ClrFacade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,9 @@ internal static PowerShellAssemblyLoadContext GetAssemblyLoadContext()
_psLoadContext = AssemblyLoadContext.Default as PowerShellAssemblyLoadContext;
if (_psLoadContext == null)
{
throw new InvalidOperationException(ParserStrings.InvalidAssemblyLoadContextInUse);
// The default load context may not be ours. This can happen during,
// for instance, xUnit testing.
_psLoadContext = new PowerShellAssemblyLoadContext(String.Empty);
}
}
return _psLoadContext;
Expand Down
3 changes: 1 addition & 2 deletions test/csharp/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
"netstandardapp1.5": {
"imports": [ "dnxcore50", "portable-net45+win8" ],
"dependencies": {
"NuGet.Packaging.Core": "3.5.0-beta-1145",
"xunit": "2.1.0",
"dotnet-test-xunit": "1.0.0-dev-91790-12"
"dotnet-test-xunit": "1.0.0-dev-140469-38"
}
}
},
Expand Down