Plugins have several assumptions towards the environment so that their tests can run. (Assumptions that cannot be checked while compiling.) Most of the plugins check for these assumptions and disable tests so it is important that it is documented what is needed to fully run all tests. Please help me for gathering the full list. We have:
gpg2 binary (@petermax2 should know more about that)Should we document this in doc/TESTING.md (one central place) or individually in the contract of the plugins? (And write a script that collects all information together.)
gpg2binary (@petermax2 should know more about that)
Either version 1 or version 2 is required (gpg or gpg2 must be executable by the user, that runs the tests). This is the only runtime requirement for the crypto and fcrypt plugins.
Personally I prefer to store the info at doc/TESTING.md. The information is not being changed that often. Also one has a central place to look for when setting up an environment for running the tests.
Yes, for the dbus plugin tests a D-Bus daemon needs to be running. At least one bus (either "system" or "session") needs to be available.
I agree with @petermax2: doc/TESTING.md seems like the better option.
@waht Thank you for the quick answer! Does it test different things if system and/or user sessions are started?
You're welcome :)
No, the tests are the same since on MacOS only a "session" bus is available (from homebrew) and on Linux the "system" bus is usable on CLI (e.g. build server or container) - it seems like the "session" bus is entangled with X11.
In a (docker) container with the "session" bus started the connection fails:
root@c41038f06544:/# dbus-daemon --session --fork
root@c41038f06544:/# dbus-monitor --session
Failed to open connection to session bus: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
See also #1820 for different approaches (avoiding manual docu) and #1899 for a very similar to discussion: what to do if we know a test will fail but without a way to detect it from within the program but only within CMake.
Thank you for your help!
If additional envs are needed, please document them in TESTING.md.