Skip to content

Commit

Permalink
missing_file
Browse files Browse the repository at this point in the history
  • Loading branch information
jngrad committed Jun 11, 2024
1 parent c87fd85 commit 72d35ea
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions testsuite/cmake/test_install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
# Copyright (C) 2018-2022 The ESPResSo project
#
# Copyright (C) 2018-2024 The ESPResSo project
#
# This file is part of ESPResSo.
#
Expand All @@ -15,6 +16,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

# load bash unit testing library
source BashUnitTests.sh
Expand All @@ -25,14 +27,18 @@ function test_install() {
local -r filepaths=("@ESPRESSO_INSTALL_BINDIR@/pypresso" \
"@ESPRESSO_INSTALL_PYTHON@/espressomd/espresso_core.so" \
"@ESPRESSO_INSTALL_PYTHON@/espressomd/_init.so" \
"@ESPRESSO_INSTALL_PYTHON@/espressomd/__init__.py"
"@ESPRESSO_INSTALL_PYTHON@/espressomd/__init__.py" \
"@ESPRESSO_INSTALL_PYTHON@/espressomd/io/__init__.py" \
"@ESPRESSO_INSTALL_PYTHON@/espressomd/io/writer/__init__.py" \
"@ESPRESSO_INSTALL_PYTHON@/object_in_fluid/__init__.py" \
"@ESPRESSO_INSTALL_PYTHON@/object_in_fluid/oif_classes.py" \
)
for filepath in "${filepaths[@]}"; do
assert_file_exists "${filepath}"
done

# check no Python file was installed outside espressomd
paths=$(find "@CMAKE_INSTALL_PREFIX@" -path "@ESPRESSO_INSTALL_PYTHON@/espressomd" -prune -o \( -name '*.py' -o -name '*.so' \) -print)
paths=$(find "@CMAKE_INSTALL_PREFIX@" -path "@ESPRESSO_INSTALL_PYTHON@/espressomd" -prune -o -path "@ESPRESSO_INSTALL_PYTHON@/object_in_fluid" -prune -o \( -name '*.py' -o -name '*.so' \) -print)
count=$(echo "${paths}" | wc -l)
assert_string_equal "${paths}" "" "${count} files were installed in the wrong directories:"$'\n'"${paths}"

Expand Down

0 comments on commit 72d35ea

Please sign in to comment.