Commit graph

248 commits

Author SHA1 Message Date
Joey Aiello f41b94fe03 change '2k' years in build script (#3043) 2017-01-25 18:00:39 -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
Jason Shirk 8c08c7b382 use global nuget package cache (#2987) 2017-01-17 13:00:52 -08:00
Jason Shirk 02b5f357a2 Remove trailing whitespace (#3001) 2017-01-16 13:31:14 -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
Manikyam Bavandla 3938cdb33a [Build] Update the logic to remove PSGetModuleInfo.xml from PowerShellGet module on Non-Windows platforms. (#2897) 2016-12-16 22:16:03 -08:00
Hemant Mahawar e26c2a8752 Adding windows server names to the windows packages + Misc formatting fixes (#2757)
* Adding windows server names to the windows packages + Misc formatting fix

Misc fixes are:
- Added Get-PackageSemanticVersion function
- Added New-ZipPackage function to separate the Zip packaging code
- Removed ending ';' in hashtable syntax since entries are on new lines
- Standardized the variable name from $Source to $PackageSourcePath for
various packaging functions
- Removed 'return' in the function end to output the variable value
- Added -verbose to Write-Verbose to show the paths of various packages

* update

* Adding windows server names to the windows packages + Misc formatting fix

Misc fixes are:
- Added Get-PackageSemanticVersion function
- Added New-ZipPackage function to separate the Zip packaging code
- Removed ending ';' in hashtable syntax since entries are on new lines
- Standardized the variable name from $Source to $PackageSourcePath for
various packaging functions
- Removed 'return' in the function end to output the variable value
- Added -verbose to Write-Verbose to show the paths of various packages

* update

* Addressing review feedback

* Removed the $PackageVersion variable per review feedback

* Error message fix
2016-12-14 09:28:38 -08:00
Sergei Vorobev cb378be1c8 Create Start-PSRelease helper function (#2753) 2016-12-12 09:34:17 -08:00
Naadir Jeewa 32a8601f92 Rebase onto .NET Core 1.1 (#2737)
* 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
2016-12-07 18:29:21 -08:00
James Truher [MSFT] 8e360bffb1 modify Start-PSPester to accept -Quiet to eliminate Pester output (#2795)
* modify Start-PSPester to accept -Quiet to eliminate Pester output

also modify travis.ps1 to include -Quiet for Pester args to reduce
stdout log size which should hopefully allow daily builds to run
without being cancelled due to too much output

* Add error detail information as part of Test-PSPesterResults

Test-PSPesterResults will now also emit information about the errors
found during a test run rather than just the number of failed tests.
Created a new errorlog function so the output of errors will be red.
2016-12-01 11:23:14 -08:00
Manikyam Bavandla 67e9bf6376 - Fixed failing PackageManagement related tests in daily-builds (#2759)
- Updated Restore-PSModule function to delete the PSGetModuleInfo.xml so that this file will not be included in the PowerShell release.
- Since PackageManagement module gets installed with PowerShellGet module, removed PackageManagement module name in Restore-PSModule command invocation.
2016-11-21 17:36:51 -08:00
Mike Richmond cac96e5fc9 Fixing powershell.exe lib paths and more thoroughly cleaning the powershell-native directory (#2758) 2016-11-21 16:55:03 -08:00
Mike Richmond bfd6d65458 Add x86 CrossGen support (#2726) 2016-11-20 12:59:50 -08:00
Sergei Vorobev 471594c6ab Make Start-PSBootstrap on macOS better
No errors if brew dependencies already present
2016-11-19 23:52:16 -08:00
Sergei Vorobev 5ff63e50b7 Make Restore-PSModule -Name parameter a [string[]] 2016-11-19 23:52:16 -08:00
Jianyun Tao 1fff6760b6 Removed PowerShellGet source and replaced with ones from myget 2016-11-19 23:52:16 -08:00
Jianyun Tao 9b27d4a23a add psmodulerestore in travis.ps1 2016-11-19 23:52:16 -08:00
Jianyun Tao bfe59b3495 # This is a combination of 3 commits.
# 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
2016-11-19 23:52:16 -08:00
Jianyun Tao 535f977d1a Update build.psm1 to pull PackageManagement assemblies 2016-11-19 23:52:16 -08:00
Mike Richmond c9fb03edf2 Add x86 support to the MSI installer 2016-11-18 16:35:16 -08:00
Mike Richmond e23b0b2002 Add runtime win7-x86 2016-11-18 16:35:16 -08:00
Mike Richmond 81b2339979 Add support to build x86 packages for PowerShell Core 2016-11-18 16:35:16 -08:00
Sergei Vorobev dbc084537a Remove default value for version from Install-Dotnet, so it's controlled only in Start-PSBootstrap 2016-11-14 11:27:38 -08:00
Sergei Vorobev f5ca586118 Temporarely pin dotnet obtain script url 2016-11-14 11:27:38 -08:00
Dongbo Wang dad2c7d155 Update releasing doc to include steps to create Linux/macOS packages and NuGet packages (#2663)
* Update releasing.md with package creation steps for Linux and macOS

* Add documentation for creating NuGet Packages

* Minor fixes
2016-11-11 17:13:04 -08:00
Aditya Patwardhan b18adb85d4 Add OpenCover PS Module to collect code coverage (#2585)
* Add OpenCover PS Module to collect code coverage

OpenCover PS Module helps is collecting Code Coverage using the OpenCover
toolset. The module helps in comparing two code coverage runs as well.

* Change OpenCover.psd1 to ASCII

* Fix an error in path for OpenCover

Fixed an error on path for OpenCover. Also used ZipFile class instead of
cmdlet as it might not be available on CI system.

* Convert module to be Powershell v4 compliant

Changed implementation from classes to PSObjects and implemented
Expand-ZipArchive.

* Added CodeCoverage as a configuration to project.json files

Added CodeCoverage as the new configuration for all the project.json
files. When Start-PSBuild is executed with configuration as CodeCoverage,
we change the degubType to 'full' as required by OpenCover toolset.

Also made changes to appveyor.psm1 to build a CodeCoverage package on
daily builds and publish it as a zip.

* Addressed code review comments

Changed from Add-Member to use pscustomobject type accelator. Removed
[gc]::collect.

* Added explicit garbage collection

* Addressed code review comments

- Make sure that the build Start-PSPackage gets is not a code coverage
  build
- Add debugType = full for FullCLR
- Remove configurations from PackageManagement files as it is not needed.
- Build CodeCoverage build first in AppVeyor.

* Resolve merge conflict

* Fix indentation

* Fix newline at end of file

* Added command discovery for locating OpenCover.console.exe
2016-11-11 11:12:07 -08:00
Hemant Mahawar f315647214 Use the unabbreviated parameter names in Start-PSBootstrap (#2623) 2016-11-04 13:17:30 -07:00
Sergei Vorobev a3afeee54e Fix Start-PSBootstrap install_name_tool call on macOS (#2601) 2016-11-03 14:30:11 -07:00
Sergei Vorobev 46ff660271 Fix crypto libs patching logic to accomodate multiply files (#2541)
Native library also changed from System.Security.Cryptography.Native.dylib
to System.Security.Cryptography.Native.OpenSsl.dylib

See discussion in #2510
2016-11-02 14:25:46 -07:00
Sergei Vorobev 2f233644f2 Pin dotnet-cli version to 1.0.0-preview3-003930 (#2573) 2016-10-31 17:55:29 -07:00
Mike Richmond 9b478dd531 Fixing the Win10 sdk presence check (#2568) 2016-10-31 15:02:44 -07:00
Steve Lee 44eb20dc8f Fixes #2534 by replacing expensive WMI query with Win32 API calls (#2535)
* Fixes #2534 by replacing expensive WMI query with Win32 API calls

* fix break on unix build

* added tests for #2535

* although test passed, fixing exception that shows up

* fixed Describe text

* addressing code review feedback

* addressing review feedback to comment on why sleep is needed
added check that test processes are created before we try to kill them

* fixed test to timeout and pending fix for #2561
2016-10-31 09:41:13 -07:00
Sergei Vorobev 5c6a11213b Wrap calls to choco install in Start-NativeExecution (#2547) 2016-10-27 13:06:17 -07:00
Dongbo Wang 1d29d42ff7 Remove crossgen'ed IL assemblies and then rename NI assemblies to the same as the corresponding IL images. (#2484)
* Remove crossgen'ed IL assemblies and then rename NI assemblies to the same as the corresponding IL images.
This is to make sure:
  1. The dependency existence check by powershell.exe will pass for all TPAs.
  2. CoreCLR by default will load the NI images even though it's using names of the IL images.

* Update the comment to make it easy to understand
2016-10-18 13:12:51 -07:00
Dongbo Wang a1aac43f1b Update build.psm1 to not remove IL assemblies after crossgen because the latest dotnet.exe checks the existence of all TPA assemblies, including those built from the local projects 2016-10-14 10:02:44 -07:00
Dongbo Wang 2e402cfef1 Update powershell to depend on latest dotnet core packages (preview1-24530-04 from 9/30/2016) 2016-10-14 10:02:44 -07:00
Andrew Schwartzmeyer f62dd4bf54 Allow Start-PSBuild -Output to take absolute path (#2398)
There was no point to using Join-Path here,
but it made it impossible to specify absolute paths
(or any path outside of the PowerShell repo).
2016-10-03 11:04:40 -07:00
Mike Richmond 374e1d1b21 Merge pull request #2280 from vors/admin-tests
Separate tests on Windows CI to Admin-Required and Non-Admin-Required
2016-09-29 16:28:29 -07:00
Aditya Patwardhan f31d4a5ac2 Add archive with test content to AppVeyor artifacts for daily builds.
The change adds Compress-TestContent cmdlet to build.psm1 so that it can
compress the powershell test content. This is done only for daily builds.
2016-09-29 12:38:12 -07:00
Sergei Vorobev 5fe1c431fa Make Get-PesterTag allow only one scope tag (CI, Feature, Priority) 2016-09-29 12:29:27 -07:00
Sergei Vorobev 917bf5abc9 Fix bug about Admin tests defaults Start-PSPester in build.psm1 2016-09-29 12:29:27 -07:00
Sergei Vorobev 911c7d9976 Replace Transcription by *> redirection
due to the issue https://github.com/PowerShell/PowerShell/issues/2334
2016-09-29 12:29:27 -07:00
Sergei Vorobev d1d82d03b4 Make Invoke-AppVeyorTest run elevated and non-elevated tests separately
- Add RequireAdminOnWindows to the list of blessed tags
- Fix a bug in Get-PesterTag where we accepted 'Slow' as a proper priority
- Fix missed comma in Start-PSPester parameters
- Add documentation about new Pester tag
- Fix finishing logic for Start-PSPester -Unelevate
2016-09-29 12:29:27 -07:00
Sergei Vorobev 339c7d80e4 Add Start-PSPester -Unelevated
That will enable running tests without Admin in CI
2016-09-29 12:29:27 -07:00
Dongbo Wang 18f732f1e0 Improve Start-PSPackage to support zip package, downlevel packages for win-plat. Fix the version issue and package name for creating msi and appx (#2361)
* Improve Start-PSPackage to support zip package, downlevel packages for win-plat. Fix the version issue and package name for creating msi and appx

* Address comments about New-PSOptions

* Update Start-PSPackage to not show the warning from New-PSOptions
2016-09-28 10:47:16 -07:00