Skip to content
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

Dependency graph is incorrect when running DotNetTest #122

Closed
5 tasks done
gep13 opened this issue Sep 1, 2023 · 1 comment
Closed
5 tasks done

Dependency graph is incorrect when running DotNetTest #122

gep13 opened this issue Sep 1, 2023 · 1 comment
Labels
Bug Issues where something has happened which was not expected or intended
Milestone

Comments

@gep13
Copy link
Member

gep13 commented Sep 1, 2023

Checklist

  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my problem.
  • I have verified this is not an issue for a specific package.
  • I have verified this issue is not security related.
  • I confirm I am using official, and not unofficial, or modified, Chocolatey products.

What You Are Seeing?

When running the build.bat for a project that is using .NET Core, the dependency tree is not set up correctly when it comes to the unit testing steps. The end result is the attempt to upload test results to TeamCity happens before the unit tests have been completed. As a result, the test results and also the test coverage if there is any, doesn't end up in the correct place.

What is Expected?

The required dependencies should be run, in the correct order, to ensure that all the necessary tasks are completed as part of the build.

How Did You Get This To Happen?

  1. On a project that is using Chocolatey.Cake.Recipe and makes use of RunDotNet run the build.bat file
  2. This will run the build
  3. Assuming that it runs to completion, look at all the Tasks that were run
  4. See that the tasks to do "things" with the test results happens before the test results have been generated

System Details

  • Operating System: 10
  • Windows PowerShell version: 5.1.19041.3031
  • Chocolatey CLI Version: 2.2.2
  • Chocolatey Licensed Extension version: N/A
  • Chocolatey License type: N/A
  • Terminal/Emulator: PowerShell

Installed Packages

N/A

Output Log

N/A

Additional Context

N/A

@gep13 gep13 added the Bug Issues where something has happened which was not expected or intended label Sep 1, 2023
@gep13 gep13 added this to the 0.24.1 milestone Sep 1, 2023
@gep13 gep13 closed this as completed Sep 1, 2023
gep13 added a commit that referenced this issue Sep 1, 2023
When running a project via .NET Core, the dependency graph wasn't being
setup properly when it comes to unit testing. The end results was that
tasks were running to act on the results of the unit tests, when the
unit tests hadn't actually been run yet.

This commit address this problem by ensuring that all dependencies are
in place, similar to how they are done when it is being run under full
.NET Framework.
gep13 added a commit that referenced this issue Sep 1, 2023
* hotfix/0.24.1:
  (#119) Change dependencies are run time
  (maint) Add information messages to help debug
  (maint) Correct whitespace lines
  (maint) Output the Test Directory from parameters
  (#122) Fix dependency graph for unit testing
@choco-bot
Copy link

🎉 This issue has been resolved in version 0.24.1 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

gep13 added a commit that referenced this issue Sep 1, 2023
* master:
  (#119) Change dependencies are run time
  (maint) Add information messages to help debug
  (maint) Correct whitespace lines
  (maint) Output the Test Directory from parameters
  (#122) Fix dependency graph for unit testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues where something has happened which was not expected or intended
Projects
None yet
Development

No branches or pull requests

2 participants