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

Use TestItems.jl #153

Merged
merged 2 commits into from
Sep 23, 2024
Merged

Use TestItems.jl #153

merged 2 commits into from
Sep 23, 2024

Conversation

JoshuaLampert
Copy link
Owner

With the current testing setup it is quite cumbersome to run only certain tests. I usually just commented all the other tests by hand. By using TestItems.jl and TestItemRunner.jl this is much more convenient because single test items can be run separately in VScode. The usual testing workflow using ]test still works. Additionally, running tests is much faster this way. We also don't need the @trixi_testset macro anymore.

See also https://www.julia-vscode.org/docs/stable/userguide/testitems/.

change_entropy=-3.1086244689504383e-15)

@test_allocations(semi, sol, allocs=10_000)
@test_allocations(semi, sol, allocs=2_000)
Copy link
Owner Author

Choose a reason for hiding this comment

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

I needed to increase the allocations from 1_500 to 2_000 for some reason to make the test pass (the number of allocations was 1_920). I have no idea why this was necessary. The same holds for the upwind allocations of the next @testitem.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting. I also have no immediate idea. Could be caused by less effective constant propagation or something like this 🤷

Copy link
Owner Author

Choose a reason for hiding this comment

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

Ok, but I think it's fine. It's only marginal.

Copy link

codecov bot commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.97%. Comparing base (ef9e82f) to head (327a9b0).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #153   +/-   ##
=======================================
  Coverage   97.97%   97.97%           
=======================================
  Files          19       19           
  Lines        1776     1776           
=======================================
  Hits         1740     1740           
  Misses         36       36           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@ranocha ranocha left a comment

Choose a reason for hiding this comment

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

Sounds reasonable. I didn't read all the code changes in detail.

@JoshuaLampert JoshuaLampert merged commit 2f11fb1 into main Sep 23, 2024
17 checks passed
@JoshuaLampert JoshuaLampert deleted the testitems branch September 23, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants