File: common

package info (click to toggle)
tap.py 2.5-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 648 kB
  • sloc: python: 1,869; makefile: 163; sh: 50
file content (30 lines) | stat: -rw-r--r-- 518 bytes parent folder | download | duplicates (2)
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
28
29
30
#!/bin/sh
set -e
set -u
cd "${AUTOPKGTEST_TMP:-"${ADT_TMPDIR}"}"
e=0

: "${PYVERSIONS:=py3versions}"
: "${NOSETESTS:=nosetests3}"

for python in $($PYVERSIONS --supported); do
	case "$python" in
		(python3*)
			dist_packages=/usr/lib/python3/dist-packages
			;;
		(python2*)
			dist_packages=/usr/lib/$python/dist-packages
			;;
		(*)
			echo "Do not know how to test $python" >&2
			exit 2
			;;
	esac

	echo "Testing $python..."
	$python $(command -v $NOSETESTS) \
		$dist_packages/tap \
		2>&1 || e=1
done

exit $e