From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D46D4138334 for ; Wed, 1 Aug 2018 08:39:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 09933E0891; Wed, 1 Aug 2018 08:39:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D428CE0891 for ; Wed, 1 Aug 2018 08:39:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AB7B7335CDC for ; Wed, 1 Aug 2018 08:39:38 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0CFF4390 for ; Wed, 1 Aug 2018 08:39:36 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1533112684.afe5f6320a174578f8aad50ad00ee1e37028334b.mgorny@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: / X-VCS-Repository: proj/portage X-VCS-Files: .travis.yml X-VCS-Directories: / X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: afe5f6320a174578f8aad50ad00ee1e37028334b X-VCS-Branch: master Date: Wed, 1 Aug 2018 08:39:36 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 404b78ef-9ffa-456f-a012-ec5a7c91a24e X-Archives-Hash: e1ff3265967d19553b5410b04d469376 commit: afe5f6320a174578f8aad50ad00ee1e37028334b Author: Michał Górny gentoo org> AuthorDate: Wed Aug 1 06:00:51 2018 +0000 Commit: Michał Górny gentoo org> CommitDate: Wed Aug 1 08:38:04 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=afe5f632 .travis.yml: Take advantage of tox Replace the code responsible for installing dependencies and running tests on Travis to use tox. This reduces code duplication (= risk of mis-sync) and saves us from those hoops needed to install dependencies conditionally via travis. Reviewed-by: Zac Medico gentoo.org> Closes: https://github.com/gentoo/portage/pull/348 .travis.yml | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9313fc645..846308e08 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,30 +8,14 @@ python: # command to install dependencies install: - - sudo apt-get update -qq - - sudo apt-get install -y libxml2-utils - - pip install lxml - # python3.6+ has sha3 built-in, for older versions install pysha3 - # (except for pypy where pysha3 is broken) - - "[[ ${TRAVIS_PYTHON_VERSION} == 3.[6789] || ${TRAVIS_PYTHON_VERSION} == pypy ]] || pip install pysha3" - # python3.6+ has blake2 built-in, for older versions install pyblake2 - - "[[ ${TRAVIS_PYTHON_VERSION} == 3.[6789] ]] || pip install pyblake2" - # always install pygost for Streebog - - pip install pygost - # pyyaml is needed for building - - pip install pyyaml + - pip install tox script: - printf "[build_ext]\nportage-ext-modules=true" >> setup.cfg - ./setup.py test - ./setup.py install --root=/tmp/install-root - # prevent repoman tests from trying to fetch metadata.xsd - - mkdir -p /tmp/install-root/usr/lib/portage/cnf - - cp repoman/cnf/metadata.xsd /tmp/install-root/usr/lib/portage/cnf/ - - sudo rsync -a /tmp/install-root/. / - - python -b -Wd -m portage.tests.runTests - # repoman test block - - repoman/setup.py test - - repoman/setup.py install --root=/tmp/install-root - - sudo rsync -a /tmp/install-root/. / - - python -b -Wd -m repoman.tests.runTests + - if [[ ${TRAVIS_PYTHON_VERSION} == ?.? ]]; then + tox -e py${TRAVIS_PYTHON_VERSION/./}; + else + tox -e ${TRAVIS_PYTHON_VERSION}; + fi