File: unittests

package info (click to toggle)
pytest-mpi 0.6-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 404 kB
  • sloc: python: 2,070; makefile: 28; sh: 22
file content (27 lines) | stat: -rwxr-xr-x 588 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh

set -euf

cp -a tests "$AUTOPKGTEST_TMP"
cd "$AUTOPKGTEST_TMP"

DEB_HOST_ARCH=$(dpkg-architecture -qDEB_HOST_ARCH)
if [ "$DEB_HOST_ARCH" != "i386" ] && [ "$DEB_HOST_ARCH" != "armel" ] && [ "$DEB_HOST_ARCH" != "armhf" ]; then
	export MPI_OVERSUBSCRIBE="--oversubscribe"
fi
case $DEB_HOST_ARCH in
	i386)
		export DEFAULT_TIMEOUT=20
		;;
	riscv64)
		export DEFAULT_TIMEOUT=60
		;;
esac

for python in $(py3versions -s); do
	echo "== $python =="
	$python -m pytest -p pytester \
	    --cov=/usr/lib/python3/dist-packages/pytest_mpi \
	    --runpytest=subprocess \
	    tests/
done