-
Notifications
You must be signed in to change notification settings - Fork 3k
tests: Unable to share code in tests #5524
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
Comments
Definitely a problem. I don't presently have a design for a solution. I'm very open to suggestions here. |
Yep, this was a bit of an oversight when this was first implemented!
Seems ok, and should be pretty straight forward to accomplish. The edits would need to be made in |
A set of tests (test unit) might need a common folder, as shown above How can this be defined? Set somehow in our tools as @bridadan proposed above? Who should define this dependency? A target defines it's own dependencies via labels. Can one test unit do the same? Not a config option? |
Not to my knowledge, no. And there isn't really anything in the tools right now that would allow us to do that.
Same thing here, there isn't really a mechanism for this that I know of. Since we already treat the folders EDIT: we should probably looking at making those special folders CAPITALIZED too, to fit the current convention. |
I realize this issue probably already exists, but I can't seemt to find it.
Currently, we have no method for sharing code between related tests. Currently the options are:
Option 1 violates the principle of don't repeat yourself. Leads to a lot of code duplication that can fall out of sync as tests are modified.
Option 2 leads to several minor issues:
We already have the special folder host_tests in the testing folder layout. It would be helpful to have something similar for shared code. (maybe TESTS/filesystem/UTIL?).
cc @studavekar, @theotherjimmy, @c1728p9, @bridadan
The text was updated successfully, but these errors were encountered: