Commit graph

4634 commits

Author SHA1 Message Date
Aditya Patwardhan 9ab8c6df4c Make OpenCover merge and upload more reliable/usable (#3078)
* Corrected the opencover option to merge the output file

- Delete temporary zip file.
- Remove CodeCov uploading through cygwin.
- Add code to use Invoke-WebRequest to upload to CodeCov

* Codecov settings

- Wait for 1 build to start analysis.
- Do not wait for CI.
- Disable comments in PR.

* Addressed code review comments
2017-02-01 15:45:03 -08:00
Francisco Gamino 89a5c17d6b Fixing 'InFile parameter of Invoke-WebRequest doesn't work' and adding aliases (iwr for invoke-webrequest and irm for invoke-restmethod) to the web cmdlets. (#2848)
* Fixing Invoke-WebRequest InFile parameter

* Adding aliases for Invoke-RestMethod and Invoke-WebRequest

* Adding test cases for Web cmdlets -InFile parameter

* Adding tests for Invoke-WebRequest (iwr) and Invoke-RestMethod (irm) using the cmdlet aliases.

* Remove the extra leading space
2017-02-01 10:14:24 -08:00
Mike Richmond 1431105251 Adding Microsoft.PowerShell.Commands.Diagnostics to the list of packages published to our MyGet feed (#3050) 2017-01-30 16:44:23 -08:00
Aditya Patwardhan d7cf81b64d Added functionality to improve failure triaging (#3037)
* Added functionality to improve failure triaging

- Nunit logs will be created to tests.
- Logs are copied to the Azure share.
- Pester is run with -Quiet
- Elevated and unelevated runs for tests with appropriate tags

* Copy logs to Azure share and upload to CodeCov

- Zip and copy to Azure log share
- Upload to codecov using cygwin

* Fixed varaible name in if condition

* Addressed code review comments

* Modified the destination folder structure for logs

- Creates a folder structure for yyyy-MM and Windows for storing logs
- Updated zip file name to not have illegal characters

* Modifications as suggested by codecov.io
2017-01-27 09:40:18 -08:00
Noutlaw1 edf685dc9c Added alias (Path) to the FilePath parameter of the Out-File cmdlet. (#2945)
* Added parameter alias to the Out-File cmdlet, allowing -FilePath to be used as -Path.

Relevant issue: https://github.com/PowerShell/PowerShell/issues/2923

* Test to confirm the alias I added to the Out-File cmdlet's -FilePath parameter works.

* Changed test for parameter alias as per feedback.

* Updating based on feedback.

Made formatting changes:
Added space between brackets and start of cmdlet.
Moved end bracket to before the pipe and Should Not Throw statement.
Removed -InputObject parameter for the test, as it was not needed.

* Added BeforeAll to the first part of the file. Replaced tabs with spaces.

#2945

* Fixing indentation within the test file
2017-01-26 14:17:40 -08:00
Jason Shirk 3aeaeb06da cache packages in appveyor (#3019) 2017-01-26 11:34:39 -08:00
Michael Elufimov b95bc3786b Fix link to macos pkg file in Readme (#3053) 2017-01-25 22:34:35 -08:00
Jason Shirk 110878ca05 Cache padding strings up to 120 spaces (#3036) 2017-01-25 18:19:08 -08:00
Joey Aiello f41b94fe03 change '2k' years in build script (#3043) 2017-01-25 18:00:39 -08:00
Jason Shirk 564a592007 Merge rel-v6.0.0-alpha.15 2017-01-25 15:43:37 -08:00
Jason Shirk (POWERSHELL) 58afa5c077 Update spelling exception for alpha.15 2017-01-25 14:10:45 -08:00
Ilya abc3614919 Get-Help test reported as skipped if not applicable to the platform (#3009)
Addressed #2887
2017-01-24 18:04:44 -08:00
Mike Richmond f2b9f7d5ab Add WindowsUBR to Get-ComputerInfo (#2995) 2017-01-23 13:07:38 -08:00
Aditya Patwardhan e5c412e71c Fixed a typo in the code coverage yaml file (#3033) 2017-01-23 13:07:11 -08:00
Sergei Vorobev c699775272 Update CONTRIBUTING.md: avoid rewrite (#3022)
Avoid rewriting history in PR iterations.
2017-01-23 11:44:36 -08:00
Ilya cba1c26bf0 Fix typo in Unblock-File test (#3025) 2017-01-23 11:43:38 -08:00
Andrew Schwartzmeyer 3a34747913 Address code review issues 2017-01-20 11:05:24 -08:00
Andrew Schwartzmeyer f1767dd24d Fix undefined variable in build.psm1
`$rpm_dist` used to be unconditionally defined,
but the changes to support Fedora made it defined only on
RedHat family platforms, so the variable was undefined on Ubuntu
but the flag still added to fpm's arguments, causing a build error.
Now we only add the flag and its argument when it's relevant.
2017-01-20 11:05:24 -08:00
Naadir Jeewa 01dfb88e4d Initial Support for Fedora 24 (#2738)
* Initial support for Fedora 24
This commit adds initial support for the Fedora distribution,
starting with Fedora 24.

Whereever possible, build tooling for CentOS has been reused.

Until the next release of PowerShell is compiled against .NET 1.1,
the Docker release image uses the CentOS 7 build, but loads
in the CentOS 7 version of `libicu50` via LD_LIBRARY_PATH.

* Update Dockerfile

Fix typos
2017-01-20 11:05:24 -08:00
Aditya Patwardhan d6daf1f068 Add codecov.yml to fix the file paths (#3013)
CodeCov.io needs a yml file to be able to correct link the file paths to
the coverage numbers.
2017-01-19 11:19:14 -08:00
Jason Shirk (POWERSHELL) 52aa4eecf8 Update changelog for alpha.15 2017-01-18 15:09:50 -08:00
Jason Shirk (POWERSHELL) 4f02f48c69 Update links and docs for alpha.15 2017-01-18 15:09:50 -08:00
iSazonov f0a95814d5 Add Unblock-File tests 2017-01-17 17:08:29 -08:00
James Truher [MSFT] 848948597f upload pester-tests.xml log file as an artifact (#3003) 2017-01-17 13:43:48 -08:00
Jason Shirk 8c08c7b382 use global nuget package cache (#2987) 2017-01-17 13:00:52 -08:00
Jason Shirk c3588c936e Use (n) for offline file length formatting (#2986) 2017-01-17 13:00:19 -08:00
Jason Shirk 7cd5935595 Use correct win32 console mode w/ external commands (#2991)
At startup, we need to save the current console mode before potentially
enabling VT100 support.

Then, when running an external command, we should use that initial
console mode instead of whatever mode we changed it to.

An application can't rely on the shell enabling VT100 because enabling
by default can cause problems for some applications, therefore
Windows applications must enable VT100 themselves.
2017-01-17 12:56:23 -08:00
Ilya 9b23e1e1fe Fix error handling in parsing 'using' statement (#3007) 2017-01-17 12:54:43 -08:00
Jason Shirk 02b5f357a2 Remove trailing whitespace (#3001) 2017-01-16 13:31:14 -08:00
Sergei Vorobev f4f576c92b Rename Wait-CompleteExecution to Wait-UntilTrue 2017-01-12 14:25:07 -08:00
Sergei Vorobev 684a25b9ea Fix Wait-CompleteExecution usage 2017-01-12 14:25:07 -08:00
Sergei Vorobev fab25c5d50 Remove -Force from Import-Module in tests 2017-01-12 14:25:07 -08:00
Sergei Vorobev ab06adf774 Another attempt to make native timer test less flaky 2017-01-12 14:25:07 -08:00
Hemant Mahawar 4c41e3c34d Added Area-DSC 2017-01-12 09:12:48 -08:00
Paul Allen c43de5a19f Add dependent symlinks in package for libmi.so 2017-01-10 17:44:04 -08:00
James Truher [MSFT] c97ca777df Jameswtruher/travisdailybuild (#2958)
* 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
2017-01-10 14:42:27 -08:00
Mike Richmond 4eb1494442 Revert "Initial Support for Fedora 24" (#2970) 2017-01-06 13:09:40 -08:00
Naadir Jeewa 8262091b3a Initial Support for Fedora 24 (#2738)
* Initial support for Fedora 24
This commit adds initial support for the Fedora distribution,
starting with Fedora 24.

Whereever possible, build tooling for CentOS has been reused.

Until the next release of PowerShell is compiled against .NET 1.1,
the Docker release image uses the CentOS 7 build, but loads
in the CentOS 7 version of `libicu50` via LD_LIBRARY_PATH.

* Update Dockerfile

Fix typos
2017-01-06 10:04:18 -08:00
2xmax 1ccd155917 fixed some expected exception tests according to the template 611f7f9b77/docs/testing-guidelines/WritingPesterTests.md (L54) 2017-01-05 18:23:37 -08:00
Aditya Patwardhan a0bc987989 Fix test where Export-Alias * fails when only single file exists (#2953)
* Fix test where Export-Alias * fails when only single file exists

The test expects multiple files to be present at the location. We
explicitly create multiple files now under $TestDrive and use that the
location for Export-Alias
Also, so test structure changes.

* Address code review comments
2017-01-05 18:04:42 -08:00
Bryce Milton - MSFT 2b47b58fb0 Updating SHA values in Dockerfiles for Alpha.14 (#2961)
Previously contained Alpha.12 values - Need to find some way of
automating this.  https://github.com/PowerShell/PowerShell/issues/2960
2017-01-05 17:02:10 -08:00
Francisco Gamino 66691a1c0c Adding PlatformNotSupportedException to Counter cmdlets when running on IoT. (#2952)
* Adding PlatformNotSupportedException to *-Counter cmdlets for IoT as pdh.dll is not available.
* Adding tests to validate PlatformNotSupportedException for the Counter cmdlets on IoT.
2017-01-05 16:59:31 -08:00
Aditya Patwardhan 1264eedb42 Code coverage automation script (#2918)
This script downloads the latest nightly build package and executes the
tests on it. It also downloads all necessary tools and then uploads the
results to Coveralls.io. The badge for coverage is posted on README.md
2017-01-05 11:13:22 -08:00
iSazonov 0e2c1c4d9f Fix typo and formating in class basic parser tests 2017-01-05 08:41:34 -08:00
Ilya 124979b4da All test reported as skipped if not applicable to the platform (#2892)
* All test reported as skipped if not applicable to the platform

Fixed files:

powershell\Modules\Microsoft.PowerShell.Management\Clear-EventLog.Tests.ps1:1:if
($IsWindows -and !$IsCoreCLR) {

powershell\Modules\Microsoft.PowerShell.Management\Get-ComputerInfo.Tests.ps1:1325:
return

powershell\Modules\Microsoft.PowerShell.Management\Get-EventLog.Tests.ps1:1:if
($IsWindows -and !$IsCoreCLR) {

powershell\Modules\Microsoft.PowerShell.Management\New-EventLog.Tests.ps1:1:if
($IsWindows -and !$IsCoreCLR) {
powershell\Modules\Microsoft.PowerShell.Management\Registry.Tests.ps1:7:
if ($IsWindows -eq $false) {

powershell\Modules\Microsoft.PowerShell.Management\Registry.Tests.ps1:167:
if ($IsWindows -eq $false) {

powershell\Modules\Microsoft.PowerShell.Management\Remove-EventLog.Tests.ps1:1:if
($IsWindows -and !$IsCoreCLR) {

powershell\Modules\Microsoft.PowerShell.Management\TimeZone.Tests.ps1:17:if
($IsWindows) {

powershell\Modules\Microsoft.PowerShell.Security\FileCatalog.Tests.ps1:6:if
($IsWindows) {

powershell\engine\Help\HelpSystem.Tests.ps1:112: if ($IsWindows)

* Fix test after code review

* Move skiping to common 'try'
2017-01-04 10:09:07 -08:00
David Christian 062e15def2 Add parameter -Group to Get-Verb (#2789) 2017-01-03 15:13:42 -08:00
Dongbo Wang 906c750386 Add release checklist and add '-PSModuleRestore' to 'Start-PSBuild' in a few docs (#2946) 2017-01-03 14:32:54 -08:00
Faheel Ahmad d8b4200f6f Display PM and WS in MB instead of KB (#2927)
Modify output of Get-Process to display PM and WS in MB instead of KB.

Also change precision of CPU time to 2.
2016-12-29 10:49:15 -08:00
Lee303 78aa9a5b56 fix typo in comment (#2938) 2016-12-29 10:46:52 -08:00
Christopher Nelson 7388ec960f build: Update build.sh to run fully manual build (#2832)
* build: Update build.sh to run fully manual build
* add ubuntu-16.10-x64 to the list of architectures to build for.w
2016-12-28 13:59:51 -08:00