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

test runner arguments fix + fixed memcheck for teardown function #1962

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

alexveden
Copy link
Contributor

I fixed some bugs added refinements to test runner:

  1. BUG c3c had --test-disable-sort, but test runner used --test-nosort
  2. BUG teardown function was called after memory leak detection scope, so if memory was cleaned in teardown it didn't track by allocator and memory leak error was emitted
  3. Added --test-leak-report to enable full report on leak, which was very verbose (default behavior now is LEAKS DETECTED print)
  4. Refactored default arguments, added --test- prefix in order to maintain same argument syntax when running ./build/testrun program directly. This is very important to me, when I launch tests in debugger.
  5. Added short arguments and usage help in the case of direct ./build/testrun.

@alexveden
Copy link
Contributor Author

I added --test-quiet flag which replaces test name by . which very helpful, when we have many tests, and some of them failing in random places. It drastically reduces amount of scrolling and unnecessary text.

image

@lerno
Copy link
Collaborator

lerno commented Feb 12, 2025

Please separate out these different things in different pull requests. Bundling fixes with features is problematic, because features may introduce new behaviour that needs to be handled in a different way, for example with deprecation and fallback.

@alexveden
Copy link
Contributor Author

I'm sorry about mixing everything together. But test runner changes from last weeks were frustrating for me and slowed my TDD workflow significantly. The only reason I coped with it because I was working hard on c3fmt tool. So this PR solves every problem I had with test runner, and it contains only backward compatible changes, and no API or deprecation side effects whatsoever. But I'm open to discussion.

Now I can see Merging is blocked red banner, so could you clarify guidelines for PRs I'm a little offtrack with this merging/rebasing things? Also, it would be useful to know red lines with PRs and contributing policy. I'd love to contribute more to c3c, but I need to have clear understanding of the process and reduce friction for PRs (on technical side).

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