Commit graph

131 commits

Author SHA1 Message Date
Bruno Garcia
c57d3051d8
remove unused env var
* DOTNET_SKIP_FIRST_TIME_EXPERIENCE
2021-09-12 16:24:08 -04:00
William Li
7605982306 Set DOTNET_ROOT in tests (#5584) 2019-11-08 14:02:01 -08:00
Daniel Plaisted
6fd4a5afad Refactor tests, add coverage for building templates 2018-11-20 10:53:39 -08:00
Daniel Plaisted
b7e4f06bed Use built version of redist instead of stage 0 for running tests 2018-11-12 11:31:10 -08:00
Daniel Plaisted
96c79f9661 Enable tests 2018-10-29 11:26:53 -07:00
Abood AbuHashem
7d2f3151e8
Implement the dotnet list package command.
This commit implements the `dotnet list package` command.
2018-09-20 10:26:01 -07:00
Peter Huene
d9e8947ff4
Revert implementation of the --mode option for the publish command.
This commit reverts the implementation of the `--mode` option for the `dotnet
publish` command.  A bug in the apphost prevents this feature from working
properly in some cases and there currently is not a mechanism to service it
with this feature.

The team has decided to move this feature to 2.2.1xx for the .NET Core SDK.

Fixes dotnet/sdk#2380.
2018-07-09 12:46:13 -07:00
Peter Huene
bc96902c61
Implement mode option for dotnet publish.
This commit implements a `mode` option that can control how an application is
published with the `dotnet publish` command.

There are three supported modes:

* self-contained: publishes a self-contained application (same as
--self-contained).
* fx-dependent: publishes a framework-dependent application (with an
application host when a runtime is specified).
* fx-dependent-no-exe: publishes a framework-dependent application without an
application host.

The default when publishing without a runtime specified is
`fx-dependent-no-exe`.

The default when publishing with a runtime specified is `self-contained`.

`fx-dependent` requires netcoreapp2.1 or later when a runtime is specified.

The `--self-contained` option is still supported, but is now hidden so that
users will be encouraged to move to the `--mode` option.

Fixes #6237.
2018-06-11 15:43:55 -07:00
Peter Huene
b2b3947c68
Fix Razor server shutdown on Windows.
On Windows, the Razor server correctly creates the pid file with
`FileAccess.Write` and `FileOptions.DeleteOnClose`.  This requires a share mode
of `FileShare.Write | FileShare.Delete` to open.  However, the
`dotnet build-server shutdown` command was opening the file with
`FileShare.Read`.  As a result, an `IOException` was being thrown and was not
handled.

This change first opens the file with the appropriate share access and also
properly handles a failure to access or read the contents of the pid file.

Additionally, an integration test was added to test that Razor server shutdown
works as expected.

Fixes #9158.
2018-04-27 13:52:17 -07:00
Livar Cunha
b1fca8c4d2 Replacing the short form version of implicit msbuild parameters with longform ones. 2018-04-02 22:54:51 -07:00
Livar Cunha
10289504a8 Replacing all implicit msbuild parameters from using a forward slash to using a dash. 2018-04-02 14:49:52 -07:00
William Lee
149bdfd0fa
Change command order for tools (#8862)
dotnet install tool -> dotnet tool install
dotnet uninstall tool -> dotnet tool uninstall
dotnet list tool -> dotnet tool list
dotnet update tool -> dotnet tool update
2018-03-21 19:12:32 -07:00
Peter Huene
7ebfdde749
Add verbosity option to install tool command.
This commit adds the `--verbosity` option to the `install tool` command.

MSBuild/NuGet output is now controllable by the user and defaults to being "quiet".

This enables users to see warnings from NuGet that otherwise would be swallowed
unless NuGet returned a non-zero exit code. As a byproduct of this change, the
exception handling and error messages related to obtaining tool packages was
retooled. We no longer display `install tool` command line help for installation
failures, as it should only be displayed for command line syntax errors.

Fixes #8465.
2018-01-31 15:19:34 -08:00
Daniel Plaisted
4c3b13e4a8 Use a shorter path for test working directories, get rid of Stage 0 project.json based CLI 2017-08-29 17:59:34 -07:00
Daniel Plaisted
13da213183 Support new artifacts layout in tests and other build logic 2017-08-24 15:49:13 -07:00
Eric Erhardt
bfab25c259 Rename publish --target to --manifest.
Fix #6244
2017-04-14 16:08:32 -05:00
William Li
a6d3012da1 Replace dotnet help parser with CliCommandLineParser
CliCommandLineParserVersion 138 cannot use help as command and --help as
opinion at the same timem, update to 142
2017-04-10 22:11:14 -07:00
Eric Erhardt
99f9786ac7 Merge pull request #6270 from eerhardt/CacheRename
Rename `cache` to `store`.
2017-04-10 12:15:25 -05:00
Livar Cunha
772e838ff8 Removing the additional shared framework from the official stage2 build of the CLI. Instead, I also create a stage2 build with the legacy runtime so that we can continue to run tests tthat depend on it, but most importantly, we will be able to run backwards compatibility tests using it. 2017-04-08 00:31:27 -07:00
Eric Erhardt
95ff3f9bf8 Fix tests for cache => store rename. 2017-04-07 15:51:37 -05:00
Eric Erhardt
ab15200500 Add --self-contained to publish.
This flows to the $(SelfContained) property added in https://github.com/dotnet/sdk/pull/1053
2017-04-03 18:17:08 -05:00
jonsequitur
1b8b1d2b2c use muxer path whenever invoking dotnet 2017-03-21 14:56:12 -07:00
Jon Sequeira
3c90711938 remove console output 2017-03-20 13:45:37 -07:00
Jon Sequeira
800f19dfdc use muxer in TestCommand 2017-03-19 20:28:38 -07:00
Piotr Puszkiewicz
f318ac33f9 Unseal! 2017-03-14 14:22:11 -07:00
Piotr Puszkiewicz
fac34c7b3b Move all test commands to DotNetCommand base 2017-03-14 14:07:51 -07:00
Piotr Puszkiewicz
f6f43f6aa2 Find dotnet under tests from the dotnet executing the test 2017-03-09 13:31:04 -08:00
Rama Krishnan Raghupathy
e40435920d tests for cache taking multiple input files 2017-03-07 14:38:12 -08:00
Rama Krishnan Raghupathy
c20e106d75 Adding End to End test for cache and filtered publish 2017-02-13 17:56:25 -08:00
Piotr Puszkiewicz
b0a5d53ed5 Merge rel/1.0.0 to master 2017-02-06 12:43:57 -08:00
seancpeters
2d93968a88 New3 integration (#5430)
* Partial conversion to new3. 2 tests fail due to browserlink not restoring.

* new cache initialization

* More lzma changes, and removed a razor ref from templates

* Ephemeral hive flag added to tests that need it

* Updated the template engine version to build against. Minor code cleanup

* Config changes to make template versions separate from template engine versions

* Changed dotnet new versioning to use Product.Version

* Fixing Archiver.csproj

* Fixing dotnet new test.

* Fix LZMA Package Source Condition

* Workaround for newline differences.

* fixed tests with changed template parameters. Added a new3 template non-match test
2017-01-31 17:31:37 -08:00
Rohit Agrawal
5bbfbfeeed update nuget to 4.0.0-rc3 and sdk to 1.0.0-alpha-20170105-5 (#5214)
* update nuget to 4.0.0-rc3 and sdk to 1.0.0-alpha-20170105-5

* Modifying restore project.json to use the project.json stage0 CLI instead of restore-projectjson command.

* add a nuget dependency so migrated project has packageref and generates an assets file on restore
2017-01-06 16:28:04 -08:00
Krzysztof Wicher
7042e85292 dotnet list p2ps -> dotnet list reference 2017-01-06 14:58:38 -08:00
Krzysztof Wicher
528d37bda5 dotnet remove p2p -> dotnet remove reference 2017-01-06 14:58:38 -08:00
Krzysztof Wicher
3ad9b72664 dotnet add p2p -> dotnet add reference 2017-01-06 14:58:38 -08:00
Livar Cunha
7e5f18b584 Fixing full framework tests. 2017-01-05 22:55:43 -08:00
Piotr Puszkiewicz
2fbafe6f3f Remove StreamForwarder from CLI tests (#4936)
* WiP

* Replace StreamForwarder with OutputDataReceived

* Add build logging around test execution

* add newlines

* Add handling for the null terminator while maintaining empty lines

* Extra Diag

* Verbose logging for VS Test Console

* Fix asset file locking tests

* Add testcommand timeout + improve dotnet-new tests

* WiP

* Welcome, JoSequ!

* Fix failing tests

* Clean out diagnostics writelines

* self-PR1
2016-12-13 14:15:35 -08:00
Livar
bd590f51e6 Emitting PackageId whenever we emit AssemblyName. We need to do this to preserve the behavior from PJ where the package id matched the containing PJ folder name. In MSBuild, PackageId will match AssemblyName, unless it is explicitly specified. (#4990) 2016-12-09 16:10:16 -08:00
Krzysztof Wicher
79e6126b2a add dotnet list p2ps (#4929)
* add stub for dotnet list p2ps

* apply review feedback

* PR feedback: consistent method modifiers

* apply missed review feedback

* add test coverage and do not treat no p2ps as error

* move private methods to the bottom, rename weird res name
2016-12-07 12:56:27 -08:00
Piotr Puszkiewicz
d6cab4af58 use Sdks attribute in dotnet new templates (#4916)
* Move dotnet-new templates to Sdk attribute

* Update to MSBuild 15.1.0-preview-000454-01

To pick up a fix for Microsoft/msbuild#1431.

* Fix template newlines

* Fix casing on Microsoft.Net.Sdk

* Move migration test csproj's to Sdk attribute

* Disable parallel sdk restore

Each SDK restore operation will try to manipulate the same assets.json file since the dependency name&version are injected into a common csproj file. This can cause runtime failures when two NuGets try to restore the project at once.

* Make casing of SDK 'NET' and not 'Net'

* Remove redundatn imports

* Fix test string

* Additional race

* Replacing the SDK with the Web.Sdk when it is a Web project.

* Fixing the test by writting the csproj before running the migration rule.
2016-12-04 22:31:58 -08:00
Piotr Puszkiewicz
caad95491a Fix output race (#4911)
* Fix output race

TestCommand starts the test process before wiring up stderr & stdout. This change delays process start until after the wireup is finished so that the test process cannot shut down before we have wired up output redirection.

* Bypass stream forwarder when it fails to attach to a process

CLI has tests failing errenously when, due to timing issues, the StreamForwarders fail to attach to a process because it managed to exit before attachment occurs. 

We tried attaching the forwarders prior to Process Start but this proved impossible because the OUT and ERR streams are not available to attach before the process starts. 

This exposes a fundamental flaw in our output redirection mechanisms. We should probably move to using https://msdn.microsoft.com/en-us/library/system.diagnostics.process.outputdatareceived.aspx or a similar mechanism. However, I don't know that @brthor hadn't considered and discarded this approach.

For the time being I am attempting to make tests more deterministic by capturing the associated exceptions and moving to a different mechanism when StreamForwarders are not available.

Opened https://github.com/dotnet/cli/issues/4913 to track the broader issue.

* File.Copy is not atomic...
2016-12-04 11:54:29 -08:00
Piotr Puszkiewicz
d2d0353e60 Include Microsoft.Net.Sdk in CLI layout (#4895)
* WiP

* Update test

* Working version of Net SDK

* Latest SDK doesn't work as packageref

* DCR + PR

* Harden CLI tests against #4884
2016-12-03 14:19:54 -08:00
Krzysztof Wicher
23b46490a3 add some test cases stubs 2016-11-29 16:14:05 -08:00
Krzysztof Wicher
8b565616a0 Strings->LocalizableStrings, Extensions->ProjectRootElementExtensions, fix long lines, remove empty line 2016-11-23 15:35:48 -08:00
Krzysztof Wicher
5d1deeeea1 test project - almost finished - not all review changes included 2016-11-22 14:46:32 -08:00
Krzysztof Wicher
9212605e89 binding redirects tests: Simplify and get ready for enabling (#4692)
* binding redirects tests: Simplify and get ready for enabling

* fix targets broken during cleanup

* fix non-windows build

* apply pr feedback: remove some not needed code

* remigrate BindingRedirects samples, add x64 to bind redir proj
2016-11-14 14:26:03 -08:00
Justin Goshi
6d57ca7e14 Migrating all test projects (#4668)
* WIP migrate tests

* WIP fixing more tests

* WIP fix test build break

* Test results files are now trx

* Get CI to pass until we get an xunit xml logger

* Added DotNetTestPJ since that was needed for one test

* Fix build break

* Forgot to add DotNetTestPJ as a build task

* Need to restore project.json for the project used in ubuntu test

* Restore PJ for ubuntu test

* Switch the Ubuntu test to csproj based
2016-11-11 21:46:29 -10:00
seancpeters
40c34f891a Updating the Microsoft.Net.Sdk & Microsoft.Net.Sdk.Web versions (#4585)
* Updating the Microsoft.Net.Sdk & Microsoft.Net.Sdk.Web versions

* Fixed merge conflicts. Had to re-update the Sdk version in one place.

* re-migrate dotnet.dll

* Revert Performance Test Projects

* Fix test test

* Add missing WithRuntime

* Disable failing test test
2016-11-03 22:12:33 -07:00
Livar Cunha
9139c4006b Fixing full framework tests 2016-11-01 00:31:21 -07:00
Piotr Puszkiewicz
5ede3b6367 post migration cleanup (#4449)
* Create tests

* Basic scenario working & tested

* Feature Complete

* prevent build of intentionally broken test asset

* Update migrate command backup

* PR Feedback

* Move negative test to negative test directory

* Fix tests

* make test output directories unique

* Merge Conflict

* make backup the default behavior

* Pass2Fail

* Remove tests' PJ dependency
2016-10-29 01:58:37 -07:00