Fixed tests that were failing or throwing unnecessary information on-screen.
Updated the paths to powershell.exe as per the new artifact layout.
Added Publish-PSTestTools to Compress-TestContent
Added PS Test tools to PSModulePath before starting tests.
This change moves powershell to .NET Core 2.0. Major changes are:
1. PowerShell assemblies are now targeting `netcoreapp2.0`. We are using `microsoft.netcore.app-2.0.0-preview1-001913-00`, which is from dotnet-core build 4/4/17. We cannot target `netstandard2.0` because the packages `System.Reflection.Emit` and `System.Reflection.Emit.Lightweight`, which are needed for powershell class, cannot be referenced when targeting `netstandard2.0`.
2. Refactor code to remove most CLR stub types and extension types.
3. Update build scripts to enable CI builds. The `-cache` section is specified to depend on `appveyor.yml`, so the cache will be invalidated if `appveyor.yml` is changed.
4. Ship `netcoreapp` reference assemblies with powershell to fix the issues in `Add-Type` (#2764). By default `Add-Type` will reference all those reference assemblies when compiling C# code. If `-ReferenceAssembly` is specified, then we search reference assemblies first, then the framework runtime assemblies, and lastly the loaded assemblies (possibly a third-party one that was already loaded).
5. `dotnet publish` generates executable on Unix platforms, but doesn't set "x" permission and thus it cannot execute. Currently, the "x" permission is set in the build script, `dotnet/cli` issue [#6286](https://github.com/dotnet/cli/issues/6286) is tracking this.
6. Replace the use of some APIs with the ones that take `SecureString`.
7. osx.10.12 is required to update to `netcoreapp2.0` because `dotnet-cli` 2.0.0-preview only works on osx.10.12.
8. Add dependency to `System.ValueTuple` to work around a ambiguous type identity issue in coreclr. The issue is tracked by `dotnet/corefx` [#17797](https://github.com/dotnet/corefx/issues/17797). When moving to newer version of `netcoreapp2.0`, we need to verify if this dependency is still needed.
* Stifle progress output in build.psm1 for some operations
Modify test failure presentation to use platform available XML methods
* Add timeout support for returning runtime parsing errors
Some of the language/parser tests have been hanging in a non-reproducable manner which
causes the CI system to invalidate the entire run. This change adds support for timeout
which will fail a test if it runs to long, rather than invalidate the entire run.
current behavior is still supported, and is not done in a new session:
PS> get-runtimeerror -src '1/'
At line:1 char:3
+ 1/
+ ~
You must provide a value expression following the '/' operator.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : ExpectedValueExpression
Adding a timeout will do the operation in a async powershell session
PS> get-runtimeerror -src '1/' -timeout 5
You must provide a value expression following the '/' operator.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : ExpectedValueExpression
If the operation takes longer than the supplied timeout, a timeout error will be returned
PS> get-runtimeerror -src 'start-sleep 6' -timeout 2
get-runtimeerror : Operation Timed Out ('start-sleep 6')
At line:1 char:1
+ get-runtimeerror -src 'start-sleep 6' -timeout 2
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-RuntimeError
* Modify native linux command tests to skip on Windows and pending on Mac
* remove verbose and progress output from help tests
* Be sure that Feature Counter tests only run on Windows
Also, only call add-type in CounterTestHelperFunctions.ps1 if we're going to actually run the tests
* do not run any get-computerinfo tests on non-windows systems
* suppress progress output from PowerShell Get tests
* remove -quiet from API and CRON Builds
Travis watches output from the build to ensure that it hasn't hung
we need to find a balance between too much output and not enough output.
A run which has too much output is killed because it looks like an error loop
A run which has too little output is killed because it looks like a hang
* Remove commented line in Import-Counter.Tests.ps1
Remove extraneous extra line in PowerShellGet.Tests.ps1
* Change `-as "type"` to `-as [type]` in build.psm1
Alter timeout to 10 seconds to be improve chances of not timing out for runtime parser checks
improve logic for counter tests to also skip for IoT
* use the existing function of SkipCounterTests rather than duplicate the logic in import-counter.tests.ps1
# The first commit's message is:
Changed to PSModuleRestore switch, i.e., by default no PSModule install
# This is the commit message #2:
install PowerShell modules to publish folder as well as one level up
# This is the commit message #3:
removed workaround
* 1. Update PowerShellGet to install the modules and scripts to proper locations in PowerShell Core on Windows. 2. Added few CI tests for PowerShellGet
* Handling the scenario of FullCLR-based PowerShell on Windows.