Commit Graph
100 Commits
Author SHA1 Message Date
Andrew Schwartzmeyer 887ac21256 Remove accidentally committed temporary file
This file was used to convert the test from UTF-8 with BOM to ASCII, and
got caught in a `git commit -a`.
2016-03-08 19:15:22 -08:00
Andrew Schwartzmeyer 2c649d51f1 Update readme and known issues
[ci skip]
2016-03-08 10:12:28 -08:00
Andrew Schwartzmeyer 05ef797849 Add -Clean switch to Start-PSBuild
And use full names of cmdlets.
2016-03-07 16:43:05 -08:00
Andrew Schwartzmeyer 4e76a6261f Validate -Runtime 2016-03-07 16:43:05 -08:00
Andrew Schwartzmeyer e349704fa1 Add Start-PSPackage -Type switch to build any output
If not specified, "deb" is used as default on Linux. This should be
updated to check the distribution and required package build
dependencies.

Dependency names switched per package type, since specific package names
are different. Should check if this causes an issue on OS X when the
names are empty.
2016-03-07 16:43:05 -08:00
Andrew Schwartzmeyer 9c41d1eff7 Bump monad and windows-build submodules with SD updates 2016-03-07 16:35:22 -08:00
Andrew Schwartzmeyer e1c0f68098 Add switch to Start-PSBuild any specific -Runtime
Much better argument passing to CLI. Thanks @vors.
2016-03-07 16:08:50 -08:00
Andrew Schwartzmeyer 5671a1113d Add CentOS 7.1 runtime 2016-03-07 15:31:08 -08:00
Andrew Schwartzmeyer 57181103cf Bump .NET CLI to build 1638 2016-03-07 14:17:31 -08:00
Andrew Schwartzmeyer 24eaf8bad8 Add newly required packages
These packages are new requirements as of the 23907 build due to
refactoring of the .NET libraries.
2016-03-07 14:17:31 -08:00
Andrew Schwartzmeyer faec94ffcf Add Microsoft.NETCore.Unsupported.Platform.API package
This package contains the Windows runtime assemblies of packages that
are not actually supported on Linux. The assemblies exist in the Linux
runtime folder. While the code cannot be executed, this allows
PowerShell to use the Windows specific types in its function calls
without crashing (and allows compiling with these types in the first
place). This is *not* an ideal work-around, but we are waiting on a
better package from .NET that contains Linux runtime assemblies that
throw `PlatformNotSupported` exceptions on use.
2016-03-07 14:17:31 -08:00
Andrew Schwartzmeyer 93f8a3360f Bump versions of upgraded packages
These packages had their minor and patch versions updated in addition to
the updated build number.
2016-03-07 13:59:11 -08:00
Andrew Schwartzmeyer e12f5a427e Bump .NET packages to 23907 2016-03-07 13:59:11 -08:00
Andrew Schwartzmeyer 876a3164b8 Bump libpsl-native with OS X fixes 2016-03-04 20:02:46 -08:00
Andrew Schwartzmeyer 0df9b76322 Fix Start-Process tests
OS X's ping command requires the flags to be specified before the
arguments. I also reduced the ping count so that the tests execute a bit
faster. This resolves #556.
2016-03-04 17:35:13 -08:00
Andrew Schwartzmeyer 6382bfb069 Enable Add-Type test on Windows
Resolves #606.
2016-03-04 15:55:55 -08:00
Andrew Schwartzmeyer a93e77d6c9 Import Platform module in pester.sh for Travis 2016-03-04 15:46:54 -08:00
Andrew Schwartzmeyer 2fbc07fa72 Import Platform module on AppVeyor 2016-03-04 15:44:39 -08:00
Andrew Schwartzmeyer 0c6b14adab Programmatic indentation and whitespace-cleanup of tests 2016-03-04 14:52:27 -08:00
Andrew Schwartzmeyer 0aaf74bdcc Convert Pester tests to ASCII
Instead of UTF-8 with BOM.

Resolves #417.
2016-03-04 14:48:30 -08:00
Andrew Schwartzmeyer 901160cb78 Fix Get-Location tests
These should never have passed.
2016-03-04 14:42:36 -08:00
Andrew Schwartzmeyer 15f8433d98 Use $PSScriptRoot instead of assigning $here 2016-03-04 14:42:08 -08:00
Andrew Schwartzmeyer c37a0c4a64 Increase New-TimeSpan difference to reduce errant failures 2016-03-04 14:41:33 -08:00
Andrew Schwartzmeyer 579287c53d Fix ExecutionPolicy tests to -Skip instead of return 2016-03-04 14:40:51 -08:00
Andrew Schwartzmeyer 4feb665203 Update PSVersionTable tests for PSEdition 2016-03-04 14:40:33 -08:00
Andrew Schwartzmeyer 615eca6fd5 Use -Skip:$IsWindows
Uses the $IsWindows etc. booleans from the Microsoft.PowerShell.Platform
module instead of sourcing Test-Common repeatedly.
2016-03-04 14:39:18 -08:00
Andrew Schwartzmeyer de6a452f63 Pester test formatting cleanups 2016-03-04 14:38:01 -08:00
Andrew Schwartzmeyer 7673c4e90f Add Microsoft.PowerShell.Platform module
- Exports the IsCore, IsLinux, IsOSX, and IsWindows variables
- Imported by the default PSL profile
- Can be used automatically in Pester tests and Open PowerShell sessions
- Should maybe become a default module once it is polished
- PowerShellGitHubDev module does not explicitly use it because on
  FullCLR PowerShell (normal Windows development) it will not be
  imported automatically
2016-03-04 12:11:01 -08:00
Andrew Schwartzmeyer c94ad6c97c Bump OMI and provider submodules
Emergency fix for recursive cloning.

The OMI branch had been rebased upstream and not simultaneously fixed
here.
2016-03-04 10:50:54 -08:00
Andrew Schwartzmeyer 7857f13165 Skip SymbolicLink tests on Windows
On Windows, making symbolic links requires administrator access, so
let's skip it.
2016-03-03 18:09:52 -08:00
Andrew Schwartzmeyer 19d5b2b53a Bump monad and windows-build with Source Depot changes
Resolves #610.
2016-03-03 18:09:52 -08:00
Andrew Schwartzmeyer da9c58828e Workaround dotnet/corefx#6603 2016-03-03 17:02:07 -08:00
Andrew Schwartzmeyer aca021aaad Don't cache NuGet packages on AppVeyor
Because the resulting archive is too big, so AppVeyor wastes time making
it and testing it, and then refuses to upload it.
2016-03-03 13:57:31 -08:00
Andrew Schwartzmeyer d253a4e483 Make Add-Type test -Pending until it passes on Windows 2016-03-03 13:46:35 -08:00
Andrew Schwartzmeyer 96be23da1e Add simple regression test for Add-Type 2016-03-01 14:28:17 -08:00
Andrew Schwartzmeyer fd9140f9f8 Update CorePsTypeCatalog 2016-03-01 13:25:31 -08:00
Andrew Schwartzmeyer 3abbf62428 Fix TypeCatalogGen script 2016-03-01 13:25:31 -08:00
Andrew Schwartzmeyer 855891dc12 Clean up TypeCatalogGen dependencies
Pin to stable packages and use `net45` moniker instead of DNX.
2016-03-01 13:25:31 -08:00
Andrew Schwartzmeyer da9f5068aa Update runtime facade with additional packages
This had gotten out of date since it is a manual process.
2016-03-01 13:25:31 -08:00
Andrew Schwartzmeyer 744e1e2fbb Add System.Xml.XDocument dependency to host
This resolves #604 but leaves an open question of why the package is
required at runtime, but not at compile-time.
2016-03-01 13:25:31 -08:00
Andrew Schwartzmeyer 9f88341db1 Remove trailing comma from project.json 2016-03-01 13:21:32 -08:00
Andrew Schwartzmeyer ee7ea8011d Bump CLI to 1.0.0.001598 2016-03-01 12:27:55 -08:00
Andrew Schwartzmeyer 840c634d5e Bump .NET packages to 23829 2016-03-01 12:26:30 -08:00
Andrew Schwartzmeyer 9402c68c57 Fix Start-Sleep Pester tests 2016-02-26 13:11:14 -08:00
Andrew Schwartzmeyer 27f38f161c Bump monad with DataTable removal 2016-02-26 12:26:28 -08:00
Andrew Schwartzmeyer a67a0ca122 Add System.Threading.Thread package
Now needed to use the `Thread` type.
2016-02-26 12:26:28 -08:00
Andrew Schwartzmeyer 2518b0ab3f Bump .NET packages to 23826 2016-02-26 12:26:28 -08:00
Andrew Schwartzmeyer a4ab3cc8b6 Bump CLI version to build 1540
Latest common build.
2016-02-26 12:26:28 -08:00
Andrew Schwartzmeyer 4ddd0a8a4e Cache apt repositories on Travis 2016-02-26 11:36:47 -08:00
Andrew Schwartzmeyer f18a3478da Cache CLI on AppVeyor 2016-02-26 11:36:42 -08:00
Andrew Schwartzmeyer 48237fef3d Cache ~/.nuget on AppVeyor 2016-02-26 11:21:50 -08:00
Andrew Schwartzmeyer bc3096c94f Cache ~/.nuget on Travis
Should speed up builds by several minutes.
2016-02-26 11:05:09 -08:00
Andrew Schwartzmeyer af3e15a7bc Don't treat MMI warnings as errors on FullCLR
It can only build with warnings.

It will error if the full `SafeHandleZeroOrMinusOneIsInvalid` type is
used on FullCLR because the derivation is not completely implemented.
2016-02-24 16:35:07 -08:00
Andrew Schwartzmeyer 966be6a792 Treat C# warnings as errors 2016-02-24 16:33:17 -08:00
Andrew Schwartzmeyer 1b59a60550 Fix compiler warning about unused variable 2016-02-24 16:33:17 -08:00
Andrew Schwartzmeyer 91456111bf Fix current working directory for CMake
There is no way around this. The directory where CMake is invoked is
where it writes its build files, so we have to `pushd`. In case anything
fails, we `popd` in a finally block.
2016-02-24 11:50:56 -08:00
Andrew Schwartzmeyer 594bdacb6a Improve Start-PSBuild and Start-PSPackage functions
- Better comments
- Better indentation
- Working directory agnostic (uses `$PSScriptRoot`)
- Does not `cd`
- `PSPackage` does not call `PSBuild`
- Asserts that `bin/powershell` exists
- Derives version from `git describe` if not given
- Version parameter now a string to support metadata
2016-02-23 16:21:00 -08:00
Andrew Schwartzmeyer a18c2c43a3 Remove DSC submodule
Resolves #573.
2016-02-22 16:09:33 -08:00
Andrew Schwartzmeyer 31624ebd89 Use Start-PSBuild on AppVeyor 2016-02-22 11:29:03 -08:00
Andrew Schwartzmeyer a7177c24e2 Catch exception when used on FullCLR
This is the case when the module is used on FullCLR versions of
PowerShell (necessarily on Windows).
2016-02-22 11:29:03 -08:00
Andrew Schwartzmeyer 472b17d547 Add Start-PSPackage command to build deb/pkg packages
Deprecates `package.sh`. Committed necessary package symlink because
creating one with PowerShell is not yet implemented.
2016-02-22 11:29:03 -08:00
Andrew Schwartzmeyer 1453048674 Add cross-platform Start-PSBuild function
This can replace `build.ps1` and `build.sh`. However, we need to upload
packages so Travis can use PowerShell.
2016-02-22 11:29:03 -08:00
Andrew Schwartzmeyer 839ae08df1 Change package script to generate .deb 2016-02-22 11:29:03 -08:00
Andrew Schwartzmeyer 694ba284c8 Add basic package creation script
Creates a .pkg for OS X using Effing Package Management.

Can be easily modified to create a .deb or .rpm etc.
2016-02-22 11:29:03 -08:00
Andrew Schwartzmeyer de7b0eac08 Use deployed Pester module path instead of src 2016-02-22 11:29:03 -08:00
Andrew Schwartzmeyer d3c6d274ed Fix capitalization of GitHub in dev module's name 2016-02-22 11:29:03 -08:00
Andrew Schwartzmeyer c8891bb5a0 Copy user permissions to group and other in bin/*
Necessary for packages so that the libraries/deps files are readable,
even when owned by root (because it was installed from a package).
2016-02-22 11:29:03 -08:00
Andrew Schwartzmeyer 56ed87c108 Respect Console.BackGround color
This was bugging me. Instead of using the existing console's background
color, we were hard-coding "Black." Now we just leave it alone.
2016-02-22 11:29:03 -08:00
Andrew Schwartzmeyer b143465401 Remove banner from profile
When trying to use PowerShell a lot, this default banner gets annoying.
I don't think we need it any more. Also change the prompt to just "PS".
2016-02-22 11:29:03 -08:00
Andrew Schwartzmeyer 91765b3db3 Add Emacs-style readline bindings
Very simple implementation of C-(A,E,K,D,B,F,P,R,N,S,J,L) and Alt-(B,F).
2016-02-22 11:29:03 -08:00
Andrew Schwartzmeyer 41a236dc5b Improve pester.sh script
- Check if PowerShell has been built before trying to use it.
2016-02-19 14:59:01 -08:00
Andrew Schwartzmeyer 3f37dfa438 Improve build.sh script
- Check for cmake, g++, and dotnet programs.
- Check for project.lock.json.
- Check that libpsl-native was compiled.
2016-02-19 14:58:48 -08:00
Andrew Schwartzmeyer 15e01bd553 Improve debug.sh script
- Move to the `bin` directly so that SOS works properly.
- Check for LLDB and PowerShell programs.
- Display help text.
2016-02-19 14:58:42 -08:00
Andrew Schwartzmeyer 9f2ce63267 Fix xUnit tests for netstandardapp1.5
With the switch to `netstandardapp1.5` framework for the host, the xUnit
test runner broke. For `dotnet test` to work with the .NET Core xUnit
runner, it must continue to target `dnxcore50`. Fortunately, we can
import our project's framework, and make everything work again.

Also improved the `xunit.sh` script to check for dependencies.
2016-02-19 14:40:17 -08:00
Andrew Schwartzmeyer b257a2d2fc Reconcile rawui.cs with System.Console
With the latest packages, a lot more System.Console API is available.
This commit implements what is now available through the API.

Where an API functions correctly on Linux, the result of a call through
PowerShell works as expected. Where it is not, a nice
`PlatformNotSupported` exception is thrown (and displayed by
PowerShell).

On Linux:

- `$host.ui.RawUI.WindowTitle` can be set but cannot be get
- `$host.ui.RawUI.CusorPosition` can be set and get
- `$host.ui.RawUI.CursorSize` can be get but cannot be set
- `$host.ui.RawUI.MaxPhysicalWindowSize` can be get
- `$host.ui.RawUI.MaxWindowSize` can be get
- `$host.ui.RawUI.WindowPosition` can be get but cannot be set
- `$host.ui.RawUI.WindowSize` can be get but cannot be set
- `$host.ui.RawUI.ReadKey` can be be used, but is only approximate
2016-02-19 11:20:53 -08:00
Andrew Schwartzmeyer 2e90b29cc8 Bump .NET Core packages to rc3-23819
Brings in fix for #546 and so enables the use of the PowerShell in non
xterm terminal emulators (like Tmux and screen).
2016-02-19 09:57:21 -08:00
Andrew Schwartzmeyer 5c0abec45b Pin CLI to 1.0.0.001425 and update readme 2016-02-18 10:06:56 -08:00
Andrew Schwartzmeyer e6e4dcafbe Build with new framework and new CLI
All libraries now use the framework `netstandard1.5`, and import the
`dnxcore50` and `portable` frameworks. The app that is published,
Microsoft.PowerShell.Linux.Host, that is, the top-level dependency that
emits an executable, instead targets `netstandardapp1.5` and has a new
`runtimes` key so that .NET CLI's `restore` and `publish` commands know
which runtime implementations to resolve.

When switching to the new CLI, we needed to fix how we specified our
dependencies. In particular, the .NET CLI team helped me figure out how
to download packages that are reference assembly only on Linux, with
implementations on Windows. The result of this is the new `frameworks`
setup.

Additionally, we were incorrectly specifying our build dependencies;
that is, projects we also build (not packages). The solution was much
cleaner. We removed the `type: build` section and replaced it with the
version `1.0.0-*` that all our projects currently use.

The `project.json` files also had their names, descriptions,
indentation, and versions fixed.

The build scripts were simplified.
2016-02-18 10:06:56 -08:00
Andrew Schwartzmeyer 58ad5b66d9 Bump monad submodule with fix for Append<T>
Newest .NET Core implements this, so the reimplementation in PowerShell
was a conflicting type. It was removed.
2016-02-17 17:18:07 -08:00
Andrew Schwartzmeyer ae64f99c25 Bump .NET packages to 23817 2016-02-17 17:17:55 -08:00
Andrew Schwartzmeyer dae6e0ebd5 Use Linux.Host in xUnit tests
Make its internals visible to the `powershell-tests` assembly, and use its
`MyHost` and `Listener` classes instead of facades.
2016-02-17 17:03:59 -08:00
Andrew Schwartzmeyer 473ac41630 Initialize the ALC for the runspace tests
This initialization was moved out of the native host and into the
managed host, so the same setup must now be done before tests.
2016-02-17 17:03:59 -08:00
Andrew Schwartzmeyer 2ce694ebdd Add xUnit test runner script
Unfortunately a wrapper is needed because `LD_LIBRARY_PATH` must be set
to avoid having to place build artifacts (specifically
`libpsl-native.so`) out-of-tree to run tests.
2016-02-17 17:03:59 -08:00
Andrew Schwartzmeyer c68164f280 Remove Commands.Omi module
This was a temporary work-around that now needs to be removed (mostly
because the xUnit tests are out-of-date because we didn't have a runner,
and it's not worth it to fix them). Rather than let more cruft
accumulate, we need to remove it.

Resolves #551
2016-02-17 17:03:59 -08:00
Andrew Schwartzmeyer eb43300842 Update CorePsTypeCatalog 2016-02-17 17:03:59 -08:00
Andrew Schwartzmeyer 4d13ef1a29 Expose SMA internals to powershell-tests 2016-02-17 17:03:53 -08:00
Andrew Schwartzmeyer 9b9493241d Update xUnit dependencies for dotnet-test-xunit
Add `xunit` and `dotnet-test-xunit` packages. Import `portable-net45`
for `xunit`. Add `xunit` as `testRunner`.
2016-02-17 17:03:03 -08:00
Andrew Schwartzmeyer e19777103f Add cli-deps feed for dotnet-test-xunit
Although there is a dedicated `coreclr-xunit` feed for this package, it
is missing some needed dependencies. Rather than add yet another feed
(`aspnetvnext`), we'll use the `cli-deps` feed as it has all the
packages that `dotnet-test-xunit` needs, and is likely to stick around.
2016-02-17 16:20:17 -08:00
Andrew Schwartzmeyer 1436668fd1 Use CLI obtain script to install on AppVeyor 2016-02-17 14:20:15 -08:00
Andrew Schwartzmeyer 36bc1279a2 Pin dotnet-nightly package on Travis 2016-02-17 14:20:15 -08:00
Andrew Schwartzmeyer cc64b31741 Remove versions from frameworkAssemblies
It is odd, but they're unsupported here. If a version is given, it
causes every build/publish to think it needs to be restored again,
because the lock file doesn't end up with a version.
2016-02-12 10:32:59 -08:00
Andrew Schwartzmeyer 0ef4e90f9a Add readme to Linux.Host 2016-02-10 15:29:06 -08:00
Andrew Schwartzmeyer 5916b00261 Fix handling of bin directory 2016-02-10 13:05:46 -08:00
Andrew Schwartzmeyer dacaebefb8 Move Pester to submodule to Host/Modules
This way it can also be deployed automatically, removing the last manual
copy steps from our build scripts.

Travis and AppVeyor configurations updated for new submodule location.
2016-02-10 12:58:56 -08:00
Andrew Schwartzmeyer 79f5db71fe Add update-content.sh script 2016-02-10 12:52:36 -08:00
Andrew Schwartzmeyer 74a3855602 Add Modules to tree for content
Same as ps1xml files: already deployed in the wild, i.e. not source
code. Allows to remove recursive copies from build scripts and rely just
on CLI's behavior.
2016-02-10 12:48:46 -08:00
Andrew Schwartzmeyer 9f95aa3203 Use content to publish PSL_profile.ps1 2016-02-10 12:44:49 -08:00
Andrew Schwartzmeyer 9a2a8555e3 Copy ps1xml files into tree to use content
This allows us to remove the duplicated copying steps from our Windows
and Linux build scripts. These files are already distributed to users of
Windows, and so are not "source code."
2016-02-10 12:38:00 -08:00
Andrew Schwartzmeyer fcb2ce6d71 Remove registry stub
With latest changes to PowerShell source code, and better behaviors of
Get/Set-ExecutionPolicy, the Windows registry API stub can be removed.
2016-02-09 16:10:10 -08:00
Andrew Schwartzmeyer 5442346820 Update Get/Set-ExecutionPolicy tests
Test expected behaviors on both Windows and Linux.
2016-02-09 16:10:10 -08:00