From 65538874c09f0612948c0cc7329eff495597a06e Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 11 Mar 2024 14:28:51 -0500 Subject: [PATCH] Fix tests --- recipe/build_openmm.sh | 6 ++++++ recipe/test_openmm.sh | 49 ------------------------------------------ 2 files changed, 6 insertions(+), 49 deletions(-) diff --git a/recipe/build_openmm.sh b/recipe/build_openmm.sh index 6288dbd..6bdfa11 100644 --- a/recipe/build_openmm.sh +++ b/recipe/build_openmm.sh @@ -116,6 +116,12 @@ pushd openmm-cuda popd LIB_SDIR=".libs" repair +rm -rf $PREFIX/lib/plugins +rm -rf $PREFIX/lib/libOpenMM +rm -rf $PREFIX/include/openmm +rm -rf $PREFIX/include/lepton +rm -rf $PREFIX/share/openmm + # Copy the wheel to destination for whl in fixed_wheels/*.whl; do if [[ "$build_platform" == "osx-"* ]]; then diff --git a/recipe/test_openmm.sh b/recipe/test_openmm.sh index 13f760b..7c2901b 100644 --- a/recipe/test_openmm.sh +++ b/recipe/test_openmm.sh @@ -2,16 +2,6 @@ set -ex with_cuda="no" -# Existence tests -test -f $PREFIX/lib/libOpenMM$SHLIB_EXT -test -f $PREFIX/lib/plugins/libOpenMMCPU$SHLIB_EXT -test -f $PREFIX/lib/plugins/libOpenMMPME$SHLIB_EXT -test -f $PREFIX/lib/plugins/libOpenMMOpenCL$SHLIB_EXT -if [[ "$target_platform" == linux-64 || "$target_platform" == linux-ppc64le ]]; then - with_cuda="yes" - test -f $PREFIX/lib/plugins/libOpenMMCUDA$SHLIB_EXT -fi - ## Do they work properly? # Debug silent errors in plugin loading python -c "import openmm as mm; print('---Loaded---', *mm.pluginLoadedLibNames, '---Failed---', *mm.Platform.getPluginLoadFailures(), sep='\n')" @@ -34,17 +24,6 @@ fi # testing cuda 12 changes, see https://github.com/conda-forge/openmm-feedstock/pull/108#issuecomment-1692190752 #python -c "from openmm import Platform as P; n = P.getNumPlatforms(); assert n == $n_platforms, f'n_platforms ({n}) != $n_platforms'" -# Run a small MD -cd ${PREFIX}/share/openmm/examples -python benchmark.py --test=rf --seconds=10 --platform=Reference -python benchmark.py --test=rf --seconds=10 --platform=CPU -if [[ -z ${CI-} ]]; then # Run only outside CI, assuming there will be a GPU there - python benchmark.py --test=rf --seconds=10 --platform=OpenCL - if [[ $with_cuda == yes ]]; then - python benchmark.py --test=rf --seconds=10 --platform=CUDA - fi -fi - # Check version metadata looks ok, only for final releases, RCs are not checked! if [[ ${PKG_VERSION} != *"rc"* && ${PKG_VERSION} != *"beta"* && ${PKG_VERSION} != *"dev"* ]]; then python -c "from openmm import Platform; v = Platform.getOpenMMVersion(); assert \"$PKG_VERSION\" in (v, v+'.0'), v + \"!=$PKG_VERSION\"" @@ -56,34 +35,6 @@ else fi if [[ $with_test_suite == "true" ]]; then - cd $PREFIX/share/openmm/tests - set +ex - - # C++ tests - summary=""; exitcode=0; count=0; - for f in Test*; do - if [[ -n ${CI-} && ( $f == *Cuda* || $f == *OpenCL* ) ]]; then continue; fi - ((count+=1)) - echo -e "\n#$count: $f" - # Retry three times so stochastic tests have a chance - attempts=0 - while true; do - ./${f} - thisexitcode=$? - ((attempts+=1)) - if [[ $thisexitcode == 0 || $attempts == 3 ]]; then break; fi - done - if [[ $thisexitcode != 0 ]]; then summary+="\n#$count ${f}"; fi - ((exitcode+=$thisexitcode)) - done - if [[ $exitcode != 0 ]]; then - echo "------------" - echo "Failed tests" - echo "------------" - echo -e "${summary}" - exit $exitcode - fi - # Python tests set -ex cd python