MetPX / sr_insects

test cases for sarracenia python and c implementations.
GNU General Public License v2.0
0 stars 0 forks source link

Platform-Agnostic Testing #9

Open MagikEh opened 2 years ago

MagikEh commented 2 years ago

We should consider porting our testing setup/run/checking/teardown scripts from bash-based, to python-based so they work cross-platform (looking at you apt-get).

petersilva commented 6 months ago

um... there is no portable way to install things... you may be mad at apt, but rpm, winget, etc... all have portability issues, if not with the tools themselves, then with the packaging environment around them (which dependencies are in the repositories in the various ecosystems.) I can't even get one set of code working between redhat 8 and redhat 9. While we aren't testing packaging systems, we do need to test that the packages that we produce are correct.

As for replacing bash with python... the stuff we are doing with bash is all platform specific, how do you call winget from python? you're going to end up with if statements switching between apt & rpm & winget (& portage on mac) anyways. having the if statement in the code is probably more complicated than having per platform scripts.

I guess we could do the config file building in python, and get the file locations using Sarracenia itself... dunno.

Yes python developers can (should?) just use pip, which is relatively portable, but I've had all manner of issues with people not having compilation environments and so not being able to install dependencies where python packaging requires building c-stubs. This is mostly a windows thing, but also a huge pita on redhat 8.

And then there is setup.py... this was the blessed way to create packages (wheels) using python, but is now deprecated and should be replaced in modern distros, except the modern blessed ways don't work on the old OS and python versions ( https://github.com/MetPX/sarracenia/issues/740 )

A large subset of users want to use it as an OS tool, so would expect it to be "just there" on the system, which means using OS packages.

distilling that into requirements of the testing regime:

"Temporal" portability... sigh...