I would rather we not start depending on pytest. Just my take.There's a difference between a utility for one chipset and global infrastructure, and pytest could become the latter.
There's a pretty big testing activity starting up in OCP, involving many companies, and python is not something we will be using, for all the usual reasons. Some of those companies had python test infra and they are moving on. Contest is easy to set up, easy to run, it's getting contributors. I understand it's a commitment of a day or so to figure out, but it's worth it in our experience. It's just not that hard.
I believe starting down the python path is a bad start, and I'd rather not make it. I like to know programs have errors in the source code before I run them. I spend too much time debugging python call traces, having it work back to a missing module, to have confidence in it. Just recently I ran a program which has worked for months, and got this: Traceback (most recent call last): File "/Users/rminnich/projects/python-dlipower/scripts/dlipower", line 30, in <module> from dlipower import PowerSwitch ModuleNotFoundError: No module named 'dlipower'
What changed? nothing. Why did it break? I don't know. This sucks, but it super sucks when it happens on a batch test system and you're on a deadline. no no no no no.
Again, speaking as the person who wrote the first three device tree parsers in python, I was not as opposed to python for infra back then, but I am now. Python is always a headache every time I have to deal with it for things like test.
I realize "it's only 160 lines", now; but that's how these things always start. They don't end well.
On Fri, Oct 15, 2021 at 11:06 AM Patrick Georgi pgeorgi@google.com wrote:
Am Fr., 15. Okt. 2021 um 19:50 Uhr schrieb Ricardo Quesada ricardoq@google.com:
In the meantime, would it make sense, as Jack mentioned, to land my change [1] as it is? It is small/simple and it only has ~160 LoC Python. For comparison, other util are using Python: util/qualcomm has ~3500 LoC Python [2] I'll happily migrate + integrate my test once a end-to-end test has been chosen.
I'm fine getting it in for now, but it won't see testing every build.
Will wait for other people to chime in, though. If I don't see pushback against getting this in as-is (with the understanding that it might be out quickly again once we decide on a plan of action) by next Thursday at noon in Germany (UTC+0200), I'll see that I submit it.
Patrick
Google Germany GmbH, ABC-Str. 19, 20354 Hamburg Registergericht und -nummer: Hamburg, HRB 86891, Sitz der Gesellschaft: Hamburg Geschäftsführer: Paul Manicle, Halimah DeLaine Prado