Use Python 3 for tests

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #1463
Approved by: cgwalters
This commit is contained in:
Simon McVittie 2018-01-17 14:07:32 +00:00 committed by Atomic Bot
parent 6cabeaed3f
commit 971265e4e4
5 changed files with 12 additions and 5 deletions

View File

@ -16,7 +16,14 @@ pkg_install sudo which attr fuse strace \
if test -n "${CI_PKGS:-}"; then
pkg_install ${CI_PKGS}
fi
pkg_install_if_os fedora gjs gnome-desktop-testing parallel coccinelle clang
pkg_install_if_os fedora gjs gnome-desktop-testing parallel coccinelle clang \
python3-PyYAML
(. /etc/os-release;
if test "${ID}" = "centos"; then
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
pkg_install python34{,-PyYAML}
fi
)
# Default libcurl on by default in fedora unless libsoup is enabled
if sh -c '. /etc/os-release; test "${ID}" = fedora'; then

View File

@ -110,7 +110,7 @@ case "$ci_distro" in
libcurl4-openssl-dev \
procps \
zlib1g-dev \
python-yaml \
python3-yaml \
${NULL}
if [ "$ci_in_docker" = yes ]; then

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
#
# Copyright (C) 2015 Red Hat
#

View File

@ -28,7 +28,7 @@ extra_basic_tests=5
. $(dirname $0)/basic-test.sh
$CMD_PREFIX ostree --version > version.yaml
python -c 'import yaml; yaml.safe_load(open("version.yaml"))'
python3 -c 'import yaml; yaml.safe_load(open("version.yaml"))'
echo "ok yaml version"
# Reset things so we don't inherit a lot of state from earlier tests

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright (C) 2017 Colin Walters <walters@verbum.org>
#