We can repro on FreeBSD, Debian, Ubuntu and Fedora the same issue if we try to install Salt through pip.
When Salt is already installed on the system:
AttributeError: cannot access submodule 'cmdmod' of module 'salt.modules' (most likely due to a circular import)
When Salt is not:
AttributeError: module 'salt.modules' has no attribute 'cmdmod'
We should find a way to automate the creation of an environment where Salt is installed, can be imported, and run our tests.
A container could help here, as it allows to install Salt globally for an ephemeral run.
A specific container as Jenkins agent would work too.
As a workaround, the /opt/python/venv/ops-venv virtual environment on WindRiver works fine if you need to run tests:
$ cd operations $ source /opt/python/venv/ops-venv/bin/activate $ make test
It's not known why exactly it works, as to recreate venv gave mixed results on the same server.