Skip to content

Do not fail tests immediately #368

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

Merged
merged 1 commit into from
Nov 24, 2022
Merged

Do not fail tests immediately #368

merged 1 commit into from
Nov 24, 2022

Conversation

dougbu
Copy link
Contributor

@dougbu dougbu commented Nov 23, 2022

  • combine RegexReplace into PrintTestRunSummary task
    • remove unused WarnOnNoMatch parameter; inline other parameters
    • capture test summary in msbuild logs
      • avoid System.Console use in the task
    • fail task if any tests fail
  • collect xunit task exit codes in case of catastrophic problems (not test failures)
    • fail build if PrintTestRunSummary doesn't but errors occurred

also:

  • do not test assemblies in parallel; reduce port contention issues
  • avoid CallTarget task

nits:

  • clean some trailing whitespace in C# sources
    • mostly files I expect to update soon
  • reduce NuGet.exe restore verbosity; no longer debugging that
  • add console summary when using build.cmd
  • reduce duplication in RestorePackages target
    • only restore NetCore projects when $(BuildPortable) is true
    • restore src NetStandard project transitively through NetStandard.Test project
  • pass more properties w/ Restore target invocation

- combine `RegexReplace` into `PrintTestRunSummary` task
  - remove unused `WarnOnNoMatch` parameter; inline other parameters
  - capture test summary in `msbuild` logs
    - avoid `System.Console` use in the task
  - fail task if any tests fail
- collect `xunit` task exit codes in case of catastrophic problems (not test failures)
  - fail build if `PrintTestRunSummary` doesn't but errors occurred

also:
- do not test assemblies in parallel; reduce port contention issues
- avoid `CallTarget` task

nits:
- clean some trailing whitespace in C# sources
  - mostly files I expect to update soon
- reduce `NuGet.exe restore` verbosity; no longer debugging that
- add console summary when using build.cmd
- reduce duplication in `RestorePackages` target
  - only restore NetCore projects when `$(BuildPortable)` is `true`
  - restore src NetStandard project transitively through NetStandard.Test project
- pass more properties w/ `Restore` target invocation
@dougbu dougbu requested review from MackinnonBuck, TanayParikh, javiercn and a team November 23, 2022 20:51

<!-- Avoid restoring RuntimePortable.sln directly. -->
<_NuGetPackagesAndSolutions Include="src\System.Net.Http.Formatting.NetCore\packages.config;
test\System.Net.Http.Formatting.NetCore.Test\packages.config"
Condition=" '$(BuildPortable)' == 'true' " />
<_ProjectsToRestore Include="src\System.Net.Http.Formatting.NetStandard\System.Net.Http.Formatting.NetStandard.csproj;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another nit: this project is restored transitively and it's more reliable not to kick that off at the same time as the test project

@dougbu dougbu merged commit 06589fb into main Nov 24, 2022
@dougbu dougbu deleted the dougbu/Newtonsoft.Json.part2 branch November 24, 2022 01:07
@dougbu dougbu added this to the 3.3.0 (5.3.0) milestone Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants