Loopback setup macOS for unit testing

As discussed here in the documentation, macOS has some issues when running OpenCyphal.

This is especially difficult whenever trying to run unit tests, resulting in many failed cases.

To resolve this, I’ve started collecting all the IP addresses that need to be set in this gist file.

So that when running pytest -k udp, instead of this:

You’ll get this:

To run it, simply copy the files to your home directory and run source ~/loopback-setup.sh

After you’re done, don’t forget run source ~/loopback-setup-down.sh, as I’ve noticed it tends to overhead the CPU when kept running (at least on my Macbook Air).

So far, I’ve only added the IP addresses related to testing the udp part, if the need arises I’ll update the file with additional entries.

1 Like