python-lockfile/debian/tests/smoke-python3

48 lines
1.2 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#! /bin/bash
#
# debian/tests/smoke-python3
# Part of Debian python-lockfile package.
#
# Copyright © 2016 Ben Finney <bignose@debian.org>
# This is free software; you may copy, modify, and/or distribute this work
# under the terms of the GNU General Public License, version 3 or later.
# No warranty expressed or implied.
# See the file /usr/share/common-licenses/GPL-3 for details.
#
# Smoke test for package in Python 3 environments.
set -o errexit
set -o errtrace
set -o nounset
DISTRIBUTION_NAME=lockfile
MODULE_NAMES=(
lockfile
)
program_dir="$(dirname "$(realpath --strip "$0")")"
# Use a working directory away from the source package root,
# so that Python imports will not find the local source package.
working_dir="$program_dir"
cd "$working_dir"
test_opts="--distribution=$DISTRIBUTION_NAME"
for mod in ${MODULE_NAMES[@]} ; do
# Accumulate the module names.
test_opts="$test_opts --module=$mod"
done
for py in $(py3versions -i) ; do
printf "Python command: %s\n" $py
$py "$program_dir"/smoke_test.py $test_opts
printf "\n"
done
# Local variables:
# coding: utf-8
# mode: shell-script
# End:
# vim: fileencoding=utf-8 filetype=sh :