Commit graph

4852 commits

Author SHA1 Message Date
Steve Lee a042dc1ff1 Fix reference to sshd service restarting (#3138)
Addresses https://github.com/PowerShell/PowerShell/issues/3116
2017-02-13 14:13:13 -08:00
Ilya aa764dd54e Small typo in archive cmdlets tests (#3121)
* Small typo in archive cmdlets tests
* Add  -ErrorAction SilentlyContinue
2017-02-10 13:39:34 -08:00
Sergei Vorobev 39c44b4ffc Don't allow_failures on osx (#3123) 2017-02-09 14:01:54 -08:00
Sergei Vorobev 367b04d909 Use ruby 2.3.1 for fpm on OSX (#3120) 2017-02-09 09:35:34 -08:00
Ilya b22369e2be Make small optimization in parser tests (#3072)
* Make small optimization in parser tests

* Add Clear() for common command
Remove commands from AfterEach

* Refactoring test 'functions are resolved before cmdlets'
2017-02-08 17:42:44 -08:00
jeffbi 7ba3b50d4a Fix #3080 (#3107)
Pass null rather than "localhost" to CimSession.Create
2017-02-08 08:40:56 -08:00
Jason Shirk cc664bc639 Fix lock contention during script compilation (#3064)
In rare cases, it was possible to cause high contention on a lock used
while compiling code to run in the interpreter.

This fixes the problem in a couple different ways:

* Use ConditionalWeakTable which has finer granularity in locking
* Avoid dictionary lookups in the most common cases
  - There really aren't too many real cases, I could have covered them
    all, but keeping the code generic is useful for the future.

Not quite related, but I noticed we didn't cache certain interpreter
instructions and it made sense to add a cache because we generate a lot
of array-init instructions.
2017-02-06 23:09:55 -08:00
James Truher [MSFT] 5871e1ac4b Provide class level coverage data via OpenCover module (#3088) 2017-02-06 23:04:45 -08:00
Ilya 29818062e8 Convert Get-FileHash to a cmdlet (#3024) 2017-02-03 18:11:57 -08:00
Steve Lee 803b70f318 Update KNOWNISSUES.md (#3085)
Added some issue #s for open issues.  Removed some rows from the table that have been fixed.
2017-02-03 17:55:47 -08:00
Francisco Gamino f852e40b3c Enabling crossgen for the assemblies used by Add-Type, which are Microsoft.CodeAnalysis.CSharp.dll, Microsoft.CodeAnalysis.dll, Microsoft.CodeAnalysis.VisualBasic.dll, and Microsoft.CSharp.dll. This speeds up executing Add-Type from ~3 to 0.9 seconds. (#3086) 2017-02-03 15:19:05 -08:00
Sergei Vorobev 8517b8dafb Mark Write-Information test as pending on macOS 2017-02-03 09:27:35 -08:00
Sergei Vorobev b37371b3dd Fix patching logic for .dotnet openssl dylib
Fixes #3062
2017-02-03 09:27:35 -08:00
Francisco Gamino f57f924caf Adding '$pshome/cultureName/default.help.txt' to PowerShell Windows Core project. (#3032)
* Adding PowerShellHelpFiles package which contains default.help.txt to powershell-win-core

* Adding test case to validate that <pshome>/<culture>/default.help.txt is present. This is done by calling 'Get-Help'

* Updating get-help to skip searching for the help file when the InternalTestHooks.BypassOnlineHelpRetrieval is enable. This way, we force get-help to generate a metadata driven help object, which includes a helpUri that points to the fwlink defined in the cmdlet code.

* Updating get-help -online <cmdletName> tests to not delete the help files. Instead, I've added logic to get-help to not find the help file when the test hook BypassOnlineHelpRetrieval is enable.
2017-02-01 17:56:52 -08:00
Sergei Vorobev 9750297ce3 Add 'osx.10.12-x64' runtime to project.json files 2017-02-01 17:52:35 -08:00
Aditya Patwardhan a69116db05 Fix GetComputerInfo test for looking up registry (#3065)
* Fix GetComputerInfo test for looking up registry

* Addressed code review comments
2017-02-01 17:49:33 -08:00
Aditya Patwardhan 8303a2b3fb Fix get-help online test (#3051)
Fix the "get-help -online" test using a workaround so that when a default browser is not set, the test does not fail.
2017-02-01 17:19:55 -08:00
James Truher [MSFT] 250efcd39f Create a badge for the daily test runs in travis-ci (#3076)
* changes which enable setting a badge for the daily test runs in travis

It updates an azure blob with an SVG and that location is referenced by the
README.md file. TravisCI doesn't support this directly so in order to report
on the status of a daily test run there, we need to do this.
Provide error reporting in case the badge can't be set

* change new-object calls to use constructor

Remove extraneous date setting
update string creation to use stringbuilder rather than string addition
2017-02-01 15:53:30 -08:00
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