3 # Build and test the sample_restraint package distributed with GROMACS 2021.
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 source $VENVPATH/bin
/activate
17 # Create "sdist" source distribution archive.
18 pushd python_packaging
/src
19 # TODO: Remove extraneous environment variable with resolution of #3273
20 # Ref: https://redmine.gromacs.org/issues/3273
21 GMXTOOLCHAINDIR
=$INSTALL_DIR/share
/cmake
/gromacs \
23 # TODO: Identify SDIST
25 # Build and install from sdist.
26 # Note that tool chain may be provided differently in GROMACS 2020 and 2021.
27 # TODO: How should we distinguish the target branch?
28 # if [ "2020" -eq "$GROMACS_VERSION" ]; then
30 GMXTOOLCHAINDIR
=$INSTALL_DIR/share
/cmake
/gromacs \
31 python
-m pip
install \
35 --no-build-isolation \
37 # TODO: Build and install from $SDIST instead of wildcard.
38 # TODO: How should we distinguish the target branch?
39 # elif [ "2021" -eq "$GROMACS_VERSION" ]; then
40 # GMXTOOLCHAINDIR=$INSTALL_DIR/share/cmake/gromacs \
41 # python -m pip install \
45 # --no-build-isolation \
47 # TODO: Build and install from $SDIST instead of wildcard.
49 echo "Logic error in GROMACS version handling."
54 .
$INSTALL_DIR/bin
/GMXRC
55 pushd python_packaging
/sample_restraint
58 # TODO: Update with respect to https://redmine.gromacs.org/issues/3133
60 -DDOWNLOAD_GOOGLETEST=ON \
61 -DGMXAPI_EXTENSION_DOWNLOAD_PYBIND=ON
65 #TODO: Can we get ctest JUnitXML output here?
70 python
-m pytest
$PWD/tests
--junitxml=$PLUGIN_TEST_XML
71 # TODO: enable MPI tests
72 # if [ -x `which mpiexec` ]; then
73 # PYTHONDONTWRITEBYTECODE=1 \
74 # mpiexec --allow-run-as-root \
75 # --mca opal_warn_on_missing_libcuda 0 \
76 # --mca orte_base_help_aggregate 0 \
78 # `which python` -m pytest \
79 # -p no:cacheprovider \
81 # --junitxml=$PLUGIN_MPI_TEST_XML