Commit graph

2386 commits

Author SHA1 Message Date
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 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 da9c58828e Workaround dotnet/corefx#6603 2016-03-03 17:02:07 -08:00
Andrew Schwartzmeyer d253a4e483 Make Add-Type test -Pending until it passes on Windows 2016-03-03 13:46:35 -08:00
Andy Schwartzmeyer cdd0e9daef Merge pull request #601 from PowerShell/newitem
Modify New-Item to support Symbolic Link on Linux
2016-03-01 16:32:14 -08:00
George Fleming 134ccef8c0 Remove directory symlink first to avoid broken symlink issues 2016-03-01 15:57:16 -08:00
George Fleming d622477073 Change order of delete to get around broken symlink issue 2016-03-01 15:57:16 -08:00
George Fleming 5ab50a183f New test for symlink of directory 2016-03-01 15:57:16 -08:00
Andrew Schwartzmeyer 96be23da1e Add simple regression test for Add-Type 2016-03-01 14:28:17 -08:00
Andrew Schwartzmeyer 9402c68c57 Fix Start-Sleep Pester tests 2016-02-26 13:11:14 -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 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 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 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 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
George Fleming 43d284f6b3 New pester test for Import-LocalizedData 2016-02-11 10:13:56 -08:00
George Fleming 4fe69773d4 Modified Get-ChildItem pester test to check for sorted list of files 2016-02-10 15:52:21 -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 5442346820 Update Get/Set-ExecutionPolicy tests
Test expected behaviors on both Windows and Linux.
2016-02-09 16:10:10 -08:00
George Fleming 8adffbb2e2 Fix HOMEPATH and Wait-Event tests
On Windows, HOMEPATH is not necessarily `\Users\username`, so the test
was made to match more loosely.

Wait-Event's timeout varied more than expected, so the test's range was
increased.
2016-02-08 10:59:15 -08:00
George Fleming 6ce53af354 Fix errors on CoreCLR Windows port 2016-02-08 10:59:02 -08:00
George Fleming bdffd103d9 Remove / and /tmp references 2016-02-08 10:59:02 -08:00
George Fleming cb6d7011d9 Clean up temp files in pester scripts 2016-02-08 10:59:02 -08:00
Andrew Schwartzmeyer 5845a56d89 Use $env:CORE_ROOT if set, otherwise AppContext.BaseDirectory
Otherwise the Json.NET DLL cannot be found when Pester tests are run
over PSRP.
2016-02-04 12:58:00 -08:00
Sergei Vorobev 2096bca2b8 Run FullCLR sanitary tests in AppVeyor
This change brings a very minimal set of tests and make
build fail, if we cannot load some PS assamblies on FullCLR

We should increase test coverage for FullCLR in future.
2016-02-03 17:29:27 -08:00
Andrew Schwartzmeyer a8be633089 Bump packages to rc3-23729 2016-02-02 15:43:54 -08:00
Andrew Schwartzmeyer 71f670f86c Add packages required for updated sources
Commands.Utility now needs Microsoft.CodeAnalysis.CSharp, which doesn't
explicitly target `dnxcore50`, so now Commands.Utility and the packages
which depend on it now much `import` the Portable Windows framework.
This also required adding the aspnetvnext feed.

System.Management.Automation now requires System.Diagnostics.StackTrace.
2016-01-26 16:49:28 -08:00
Andrew Schwartzmeyer ae9c58e3e3 Remove xUnit reference from csharp/project.json
Currently fails to restore, working on prototype.
2016-01-20 10:14:44 -08:00
Andrew Schwartzmeyer 62de9f2645 Fix the Get-Item Pester test
Failed because we renamed the test directory.
2016-01-15 14:31:52 -08:00
Andrew Schwartzmeyer bbebf2f76a Reorganize tests
- Pester source code moved to `test/Pester`, deleted `ext-src`.
- Pester tests (.ps1 files) moved to `test/powershell`
- xUnit tests (.cs files) moved to `test/csharp`
- Third-party script test moved to `test/shebang`
2016-01-14 17:00:06 -08:00
Andrew Schwartzmeyer ec08d9f46c Move Pester test/Pester and push to GitHub 2016-01-14 16:17:50 -08:00