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

Add filter for test directory in runtest util #630

Open
wants to merge 2 commits into
base: unstable
Choose a base branch
from

Conversation

hpatro
Copy link
Collaborator

@hpatro hpatro commented Jun 11, 2024

Helps testing specific functionality like cluster rather than running the entire test suite.

Usage example

./runtest --test-dir tests/unit/cluster

@hpatro hpatro requested review from madolson and a team June 11, 2024 21:44
Copy link

codecov bot commented Jun 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.26%. Comparing base (e65b2d2) to head (5391733).
Report is 2 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #630      +/-   ##
============================================
+ Coverage     70.11%   70.26%   +0.14%     
============================================
  Files           110      110              
  Lines         60038    60039       +1     
============================================
+ Hits          42096    42184      +88     
+ Misses        17942    17855      -87     

see 22 files with indirect coverage changes

Copy link
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

Nice.

What I've really been missing though is the possibility to find test suites using tab completion.

What if we add an option that takes a file name as its arguments? I mean a path relative to the working directory, so that tab completion actually works. If a directory is provided, it can run all tests in that directory. WDYT?

@hpatro
Copy link
Collaborator Author

hpatro commented Jun 12, 2024

Nice.

What I've really been missing though is the possibility to find test suites using tab completion.

What if we add an option that takes a file name as its arguments? I mean a path relative to the working directory, so that tab completion actually works. If a directory is provided, it can run all tests in that directory. WDYT?

Good suggestion. Let me try out.

@hpatro
Copy link
Collaborator Author

hpatro commented Jun 12, 2024

@zuiderkwast PTAL

Copy link
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

It looks like it can work, with these limitations:

  • It accepts paths relative the repo root dir only. It doesn't accept absolute paths or relative somewhere else, if the current directory is changed.
  • It can't be repeated, like --single can.

How about we make --single and --skipunit and others work with filenames and dirs in addition to the current format? We could expand all unit names to absolut names and work with that internally. I think we can trust filenames from the user without filtering them.

@madolson
Copy link
Member

madolson commented Jul 6, 2024

How about we make --single and --skipunit and others work with filenames and dirs in addition to the current format?

I like this idea.

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.

3 participants