Skip to content

Commit

Permalink
Run install tests after building Ubuntu PPA package
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Mar 11, 2024
1 parent 3728b56 commit 1be2ec1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tools/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ override_dh_install:
dh_install
dh_missing --fail-missing

execute_after_dh_install:
# Run basic tests on the installation
TOPDIR=`pwd`/debian/tmp \
&& py3_ver=`python3 -c "import sys; print('%d.%d' % sys.version_info[:2])"` \
&& export LD_LIBRARY_PATH="$${TOPDIR}/usr/lib/`uname -m`-linux-gnu" \
&& export PYTHONPATH="$${TOPDIR}/usr/lib/python$${py3_ver}/dist-packages" \
&& "$${TOPDIR}/usr/bin/rmf3_dump" --version \
&& python3 -c "import RMF; assert(hasattr(RMF, '__version__'))" \
&& python3 -c "import RMF; assert(hasattr(RMF, 'get_all_global_coordinates'))" \
&& rm -rf "$${TOPDIR}/usr/lib/python$${py3_ver}/dist-packages/__pycache__"

override_dh_compress:
# Don't compress example files, since then they won't work!
dh_compress -Xexamples

0 comments on commit 1be2ec1

Please sign in to comment.