-
Notifications
You must be signed in to change notification settings - Fork 267
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
Make runner.create_output_path a member of TestRunner class #682
Conversation
Overall, I think the change makes sense. However, there are a couple of details which I'd like to understand prior to merging:
|
I noticed that it is being used only internally in the class. I think it is good practice to have a minimal public API, and hence functions are private unless they NEED to be public. Then again, I do not really have a stake in this matter. If you think differently, I would be happy to change to a public function.
It is done in |
Honestly, I don't have any strong feeling about it. Yet, it would be a breaking change. Hence, we might want not to change it, just for API stability reasons. @LarsAsplund what do you think?
Thanks! I was searching for it as mkdir and such...
That makes sense. Is it a large modification? I.e., would it make sense to upstream it as an option? |
It is a very small modification, the only change is that the call to
From my perspective it would be very helpful if we could upstream it. As it is now, I have copied (and minimally changed, see above) the I will think of a way to add that option in a nice way, that does not make the VUnit class a code smell, and submit a PR. Probably on monday. Thanks for the suggestion @eine ! |
I moved the |
Ping @LarsAsplund: Do you have any opinion about @eine's concern regarding API stability? This PR changes the function |
While it's a public function it's not really part of the user interface so I think it can be removed. There is a risk of course that it has been used somewhere but it doesn't strike me as a very reusable function. |
Then, we are all set! Thanks Lukas! |
Great, thanks guys! |
Background: I am working on a multi-threaded build runner for vivado and formal (symbiyosys) projects. Since e.g. Vivado will realistically probably only use about four threads, parallelization of builds is desired. The idea is to re-use the VUnit test runner code, which is robust and tested, but with different "test" objects. However I wish to modify some of the behavior, namely in this case the hashing of test output folder names. To do this I inherit the
TestRunner
class and override the methods who's behavior I want to change. In this case however, thecreate_output_path
function is not a member of the class, but a bare function.This PR makes the
create_output_path
a private member of theTestRunner
class. That enables my use case, and is also in my opinion more logical given how it is used byTestRunner
. There is no functional change for VUnit.The second commit changes the name from
create_output_path
toget_output_path
. In my mind, "create" as a verb implies that the directory is created on disk, which is is not.