Task #3132: gmxapi testing support tools
sample_restraint testing should not download files
In a build directory where I had previously set
PYTHON_PACKAGING=on, I touched some src/api .cpp files while offline, and when I reran cmake I saw
[mark-XPS review (updated-commrec-dependency-removal)] $ (cd build-cmake-clang-debug; ninja mdrun-mpi-test && bin/mdrun-mpi-test -ntmpi 4 --gtest_filter=MinimizersWorkWithConstraints/EnergyMinimizationTest.WithinTolerances/1) [0/2] Re-checking globbed directories... [1/2] Re-running CMake... -- pybind11 v2.2.4 -- Found Python interpreter: /usr/bin/python3 -- Python site-packages directory is /usr/lib/python3.6/site-packages -- Python module will be installed to GMXPLUGIN_INSTALL_PATH cache value /usr/lib/python3.6/site-packages CMake Warning at python_packaging/sample_restraint/tests/CMakeLists.txt:62 (message): Could not download test data: getaddrinfo(3) failed for github.com:443 Couldn't resolve host 'github.com' Closing connection 0 -- Configuring done -- Generating done -- Build files have been written to: /home/mabraham/git/review/build-cmake-clang-debug
The sample_restraint testing should not be downloading a .tpr file (or whatever it is doing). I can see in my source directory a
python_packaging/sample_restraint/tests/topol.tpr which should not be there. If we need a .tpr, then we should make one by calling grompp.
#4 Updated by Eric Irrgang about 1 month ago
Note that this only occurs if both BUILD_TESTING and GMX_PYTHON_PACKAGE are set, so the workaround is to build documentation with GMX_PYTHON_PACKAGE=ON and BUILD_TESTING OFF.
I will create a couple of new issues regarding improved sample_restraint integration testing and more unified test support tools. For this particular case, it might be reasonable to make the gmxapi Python package a dependency for all of the sample_restraint tests and to use it to create the test input file, even for the C++ unit tests.