Skip to content

packaging test updates and updates to packaging tests #1111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
9078d18
updates for dnc eng test package
stevenbrix Jun 6, 2019
db36124
fix sdk reference packaging
stevenbrix Jun 7, 2019
e0be3cd
fix packaging
stevenbrix Jun 7, 2019
a8309e2
minor fixups
stevenbrix Jun 25, 2019
f1a98eb
moving of DRTs around for new DigitalDocuments tests
stevenbrix Jun 26, 2019
b62c556
cleaning up test files and adding them to list to run
stevenbrix Jun 26, 2019
6124d5f
auto elevate test when not running as admin
stevenbrix Jun 26, 2019
75a8d21
making spewwriter public so it can be accessed
stevenbrix Jun 26, 2019
5c57ebc
making methods and properties public as well
stevenbrix Jun 26, 2019
464bcfa
removing owner references
stevenbrix Jun 26, 2019
317a27c
fixing up tests
stevenbrix Jun 27, 2019
aa12fc4
remove unnecessary metadata
stevenbrix Jun 27, 2019
1959a77
removing System.Security.Permissions from test projects
stevenbrix Jun 27, 2019
291f4cd
fixing up sdk references
stevenbrix Jun 28, 2019
950161f
fixup the switchup
stevenbrix Jun 28, 2019
ee35bc8
adding test infrastructure to github
stevenbrix Jul 1, 2019
12be176
packaging updates to move infra to github
stevenbrix Jul 1, 2019
bc8cc93
adding TestRuntime
stevenbrix Jul 1, 2019
68cd0e9
fixing up projects and build errors
stevenbrix Jul 2, 2019
084605e
adding reporting and deployment files
stevenbrix Jul 2, 2019
b63f6c1
fixing packaging
stevenbrix Jul 2, 2019
c56e501
fixes to packaging and test projects
stevenbrix Jul 2, 2019
1588913
adding RenderingVerification code
stevenbrix Jul 2, 2019
f207d0c
cleaning up TestRuntime
stevenbrix Jul 2, 2019
c974832
omg it built
stevenbrix Jul 2, 2019
e319be5
adding empty main for when no /waitForDebugger is passed
stevenbrix Jul 2, 2019
a67708c
removing helix workarounds
stevenbrix Jul 2, 2019
d708f2d
removing accidental temp project added
stevenbrix Jul 2, 2019
5fd1f28
updating docs and script
stevenbrix Jul 3, 2019
26cecfa
using PackagingContent
stevenbrix Jul 3, 2019
512cdb7
fixing packaging and runtests.ps1
stevenbrix Jul 3, 2019
7d00a09
don't kill the developers ide
stevenbrix Jul 15, 2019
bc7b329
fix typo
stevenbrix Jul 15, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 7 additions & 12 deletions Documentation/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,16 @@ In order to run the set of DRTs on your local machine, pass the `-test` paramete
Ignore: 0

```
If there were any failures, you can cd into $(RepoRoot)\artifacts\test\$(Configuration)\$(Platform)\Test and run the tests manually with the `/debugtests` flag using the `RunDrts.cmd` script. Note that you do not run the `RunDrtsDebug` script, as this will debug the test infrastructure, `QualityVault`. When you pass the `/debugtests` flag, a cmd window will open where you can open the test executable in Visual Studio and debug it. When the cmd pops up, you will see instructions for debugging using a few different commands, however these commands will enable you to debug the `Simple Test Invocation` executable, `sti.exe`, which simply launches the test executable you are most likely interested in debugging. Using `DrtXaml.exe` as an example, this is how you can debug the test executable. Any MSBuild style properties should be replaced with actual values:

1. `$(RepoRoot)\artifacts\test\$(Configuration)\$(Platform)\Test\RunDrts.cmd /name=DrtXaml /debugtests`
2. Enter following command into the cmd window that pops up:
`"%ProgramFiles%\Microsoft Visual Studio\2019\Preview\Common7\IDE\devenv.exe" DrtXaml.exe`
3. Once Visual Studio is open, go to `Debug-> DrtXaml Properties` and do the following:
- Manually change the `Debugger Type` from `Auto` to `Mixed (CoreCLR)`.
- Change the `Environment` from `Default` to a custom one that properly defines the `DOTNET_ROOT` variable so that the host is able to locate the install of `Microsoft.NETCore.App`.
- x86 (Default): Name: `DOTNET_ROOT(x86)` Value: `$(RepoRoot).dotnet\x86`
- x64 (/p:Platform=x64): Name: `DOTNET_ROOT` Value: `$(RepoRoot).dotnet`
4. From there you can F5 and the test will execute.
If there were any failures, you can cd into $(RepoRoot)\artifacts\test\$(Configuration)\$(Platform)\ and debug the tests by passing the `-waitForDebugger` flag to the `runttests.ps1` script like this:
> runtests.ps1 /Name=DrtXaml -waitForDebugger

This will cause the test to wait for a debugger to attach, you should see a message in the command window indicating when this is ready.

You should run `runtests.ps1` rather than any of the other `Run*.cmd` tests contained in the `Test` folder, as `runtests.ps1` will properly ensure your `DOTNET_ROOT` variables are set correctly.

*Note: To run a specific test, you can pass the name of the test like this: `/name=DrtXaml`. The names of these tests are contained in DrtList.xml.*

**NOTE: This requires being run from an admin window at the moment. Removing this restriction is tracked by https://github.com/dotnet/wpf/issues/816. **
**NOTE: This requires being run from an admin window at the moment. Removing this restriction is tracked by https://github.com/dotnet/wpf/issues/1149. **

### Testing Locally built WPF assemblies (excluding PresentationBuildTasks)
This section of guide is intended to discuss the different approaches for ad-hoc testing of WPF assemblies,
Expand Down
4 changes: 2 additions & 2 deletions Documentation/testing-in-helix.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

I'd recommend seeing the official Helix [readme](https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.Helix/Sdk/Readme.md) if you are interested in some of the general Helix concepts. I'll briefly outline what we are doing that is a bit unique:

1. Helix has built-in support for running xUnit tests. Since we are not using xUnit, we have to manually setup our machines so that they work with QualityVault and STI. During the build, we create a payload directory that contains the infrastructure we need. A single project (in our case `DrtXaml`) is responsible for creating this directory (see instances of the MSBuild property `CreateTestPayload`).
2. After the build is done, we utilize Arcade's `AfterSolutionBuild.targets` extension point to finish creating the rest of the payload if the `-test` parameter is passed to the build. Here we add the just built DRTs and if `-ci` was **not** passed into to the build, run the tests.
1. Helix has built-in support for running xUnit tests. Since we are not using xUnit, we have to manually setup our machines so that they work with QualityVault and STI.
2. After the build is done, we utilize Arcade's `AfterSolutionBuild.targets` extension point to create the payload if the `-test` parameter is passed to the build. Here we add the infrastructure and DRTs and if `-ci` was **not** passed into to the build, run the tests.
3. Helix allows you to specify a `HelixCorrelationPayload` directory, where this directory gets deployed to the Helix machine, and is made available in your various helix commands with the `HELIX_CORRELATION_PAYLOAD` environment variable. We use the payload directory created described above.
4. Helix and Azure Pipelines can report xUnit logs, so we will be updating QualityVault to produce an xUnit compatible log. We will then need to copy that log to a known location for it to be picked up. This location can be in any subfolder of the `HelixWorkItem` working directory.

Expand Down
Loading