3 # Build and test the sample_restraint package distributed with GROMACS 2020.
5 # This script is intended to support automated GROMACS testing infrastructure,
6 # and may be removed without notice.
8 # WARNING: This script assumes OpenMPI mpiexec. Syntax for launch wrappers from
9 # other implementations will need different syntax, and we should get a
10 # MPIRUNNER from the environment, or something.
12 # Make sure the script errors if any commands error.
15 # TODO: We should be able to just use a $GMXAPI_0_1_SDIST or venv artifact...
16 pushd python_packaging/src
17 GMXTOOLCHAINDIR=$INSTALL_DIR/share/cmake/gromacs \
18 python -m pip install \
22 --no-build-isolation \
26 . $INSTALL_DIR/bin/GMXRC
27 pushd python_packaging/sample_restraint
30 # TODO: Update with respect to https://redmine.gromacs.org/issues/3133
32 -DDOWNLOAD_GOOGLETEST=ON \
33 -DGMXAPI_EXTENSION_DOWNLOAD_PYBIND=ON
37 #TODO: Can we get ctest JUnitXML output here?
42 python -m pytest $PWD/tests --junitxml=$PLUGIN_TEST_XML
44 # Note: Multiple pytest processes getting --junitxml output file argument
45 # may cause problems, so we set the option on only one of the launched processes.
46 # See also Multiple Instruction Multiple Data Model for OpenMPI mpirun:
47 # https://www.open-mpi.org/doc/v3.0/man1/mpiexec.1.php
48 PROGRAM=(`which python` -m mpi4py -m pytest \
51 # shellcheck disable=SC2068
52 if [ -x `which mpiexec` ]; then
53 PYTHONDONTWRITEBYTECODE=1 \
54 mpiexec --allow-run-as-root \
55 --mca opal_warn_on_missing_libcuda 0 \
56 --mca orte_base_help_aggregate 0 \
57 -n 1 ${PROGRAM[@]} --junitxml=$PLUGIN_MPI_TEST_XML : \