* Add script to run and compare CLI perf tests
tests/Performance/run-perftests.py is a Python3 script that fetches all
of the dependencies needed to run the perf tests in test/Performance
locally. It can run the perf tests for a single dotnet.exe, or run two
dotnet.exe instances sequentially and compare the results between them.
Basic usage for a single test:
run-perftests.py --name "runid" ...\dotnet.exe
Usage for a comparison run:
run-perftests.py --name "runid" ...\dotnet.exe --base ...\dotnet.exe
For more detailed usage:
run-perftests.py -h
* run-perftests: fix publish xunit.perf.runner.cli
The code that builds xunit-performance would skip publishing
Microsoft.DotNet.xunit.performance.runner.cli due to a bug in the
condition to check whether it was published already or not. To fix the
issue and simplify the logic, I'm making it always publish when
building the project, instead of building and publishing separately.
* run-perftests: add support for python2
* run-perftests.py: fix framework version issue
The perf test harness was failing with "stage 0" binaries due to an issue
finding the correct installed framework version. The fix is to delete the
project.lock.json followed by a dotnet restore before each run, using the
dotnet.exe that is about to be tested. (Kudos to @brianrob for the debugging
help and suggested fix!)
The BuiltInCommandTests sets the current Console.Out and Console.Error, which causes the test to fail if some other test is running and writes to the console at the same time.
Fix#2768
The compile unit test needed to be updated to mock out a new call to ICommand.WorkingDirectory.
The test unit test needed to account for build-base-path getting fully qualified.
When using a ruleset with a relative path in buildOptions, csc can't
find the file because it is not working in the same directory as the
project.
Fix#2710
- Added PackOptions, RuntimeOptions, PublishOptions and updated CompilationOptions
- Added IncludeFilesResolver to parse include, exclude patterns
- Added compile, embed and copyToOutput to compilationOptions
- Renamed compilationOptions to buildOptions
- Moved compilerName into buildOptions
- This change is backwards compatible
- Added warnings to be shown when the old schema is used
- Handled diagnostic messages in ProjectReader
- Added unit and end to end tests
we used to use different code when --framework was specified than when it was not specified, this synchronizes them to use the same code path which removes a hidden NullRef
also adds tests to cover both cases
* Use a WorkspaceContext in dotnet-build to cache project data across
multiple compilations in a single build action
* Dramatically reduce string and object duplication by introducing a
"Symbol Table" that shares instances of NuGetVersion, NuGetFramework,
VersionRange and string across multiple lock-file parses
Test Results:
* Testing was done by compiling Microsoft.AspNetCore.Mvc (and it's
dependencies) and taking memory snapshots after each compilation in
dotMemory
* We used to allocate ~3MB and deallocate ~2.5MB on EACH compilation in
a single build action. This has been reduced to ~120KB
allocated/deallocated
* After introducing WorkspaceContext, total memory usage spiked from 6MB
across the whole build action to about 13MB, introducing the symbol
table dropped it back to about 5-6MB.
- Every project.json needs portable-net451+win8 and dotnet5.4 imports (required by dotnet-test-xunit).
- If a test references NuGet, it also needs "netstandardapp1.5", because that the TFM NuGet uses currently.
* Fix duplicate dependency issue
If a package has the same name as a framework assembly in the dependency
graph, we usually replace it with the framework assembly if the package
provides no assets. If the framework assembly wasn't resolved, it would
skip this logic and end up adding dupes to the list, which blows up later on.
This is a tactical fix to solve the issue, we need to do some more thinking
to determine how we want to resolve conflicts between framework assemblies,
packages and dlls with the same name.
Also removed the dependency on Microsoft.Extensions.CommandLineUtils.Sources NuGet package and instead just checking the source files into our repo as internal classes.
Fix#2526
add tests for the projectdependenciescommandfactor
Add a test variation to test overriding the configuration provided in the constructor
update test asset name
* Add satellite assemblies to deps file with locale data
* Publish satellite assemblies to output during publish
* Copy satellite assemblies from project-to-project dependencies on
build and publish