From 083b5dcd6937987ac23e8316c36e793ce78eec47 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 24 Jul 2015 22:42:29 +0200 Subject: travis-ci: Use container-based infrastructure The new travis infrastructure is container-based and does not allow the use of sudo, but travis allows to install whitelisted apt packages (http://docs.travis-ci.com/user/migrating-from-legacy/). --- testsuite/install.sh | 6 ------ 1 file changed, 6 deletions(-) (limited to 'testsuite/install.sh') diff --git a/testsuite/install.sh b/testsuite/install.sh index 4d8778ad7..6f182bc0a 100755 --- a/testsuite/install.sh +++ b/testsuite/install.sh @@ -2,9 +2,6 @@ # install script for Travis-CI -sudo apt-get update -qq -sudo apt-get install swig libxml2-utils - pip install -r testsuite/requirements.txt PYVER=$(python -c 'import sys;print(".".join(str(v) for v in sys.version_info[0:2]))') @@ -14,9 +11,6 @@ if [[ ${PYVER:0:1} == "2" && $PYVER != "2.7" ]]; then fi if [[ "$WITH_OPTIONAL_DEPS" == "yes" ]]; then - sudo apt-get install -y yum libaugeas0 augeas-lenses libacl1-dev libssl-dev \ - python-gamin python-selinux - pip install PyYAML pyinotify boto pylibacl Jinja2 mercurial guppy cherrypy python-augeas if [[ ${PYVER:0:1} == "2" ]]; then -- cgit v1.2.3-1-g7c22 From c5529d8979672d4cf92d4ba54ce01256ca1d0842 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 20 Jul 2016 21:47:17 +0200 Subject: travis-ci: Cache common xml schema files --- testsuite/install.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'testsuite/install.sh') diff --git a/testsuite/install.sh b/testsuite/install.sh index 6f182bc0a..1c9cc36b9 100755 --- a/testsuite/install.sh +++ b/testsuite/install.sh @@ -23,3 +23,23 @@ if [[ "$WITH_OPTIONAL_DEPS" == "yes" ]]; then fi fi fi + +# Setup the local xml schema cache +download_schema() { + if [[ ! -e "$1" ]]; then + wget -O "$1" "$2" + fi +} + +mkdir -p "$HOME/.cache/xml/" +download_schema "$HOME/.cache/xml/XMLSchema.xsd" "http://www.w3.org/2001/XMLSchema.xsd" +download_schema "$HOME/.cache/xml/xml.xsd" "http://www.w3.org/2001/xml.xsd" + +cat > "$HOME/.cache/xml/catalog.xml" < + + + + + +EOF -- cgit v1.2.3-1-g7c22 From 4f3cb4335c6d934c34d851efa587c525e6fcd876 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 23 Mar 2017 20:19:34 +0100 Subject: travis-ci: Cache wheels for python deps The python dependencies are only build once to create the wheel and cached using the travis-ci infrastructure. All builds afterwards will be faster because the cached version is used. --- testsuite/install.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'testsuite/install.sh') diff --git a/testsuite/install.sh b/testsuite/install.sh index 1c9cc36b9..eb569ec56 100755 --- a/testsuite/install.sh +++ b/testsuite/install.sh @@ -1,25 +1,31 @@ #!/bin/bash -ex # install script for Travis-CI +pip install --upgrade pip -pip install -r testsuite/requirements.txt +pip_wheel() { + pip wheel --find-links="$HOME/.cache/wheels/" --wheel-dir="$HOME/.cache/wheels/" "$@" + pip install --no-index --find-links="$HOME/.cache/wheels/" "$@" +} + +pip_wheel -r testsuite/requirements.txt PYVER=$(python -c 'import sys;print(".".join(str(v) for v in sys.version_info[0:2]))') if [[ ${PYVER:0:1} == "2" && $PYVER != "2.7" ]]; then - pip install unittest2 + pip_wheel unittest2 fi if [[ "$WITH_OPTIONAL_DEPS" == "yes" ]]; then - pip install PyYAML pyinotify boto pylibacl Jinja2 mercurial guppy cherrypy python-augeas + pip_wheel PyYAML pyinotify boto pylibacl Jinja2 mercurial guppy cherrypy python-augeas if [[ ${PYVER:0:1} == "2" ]]; then - pip install cheetah m2crypto + pip_wheel cheetah m2crypto if [[ $PYVER != "2.7" ]]; then - pip install 'django<1.7' 'South<0.8' + pip_wheel 'django<1.7' 'South<0.8' else - pip install django + pip_wheel django fi fi fi -- cgit v1.2.3-1-g7c22 From d5f24fed13339d01424c4f7748c239ae33e0b606 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sat, 25 Jul 2015 01:32:05 +0200 Subject: travis-ci: Also run tests with python2.4 and python2.5 --- testsuite/install.sh | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) (limited to 'testsuite/install.sh') diff --git a/testsuite/install.sh b/testsuite/install.sh index eb569ec56..13a2e9d01 100755 --- a/testsuite/install.sh +++ b/testsuite/install.sh @@ -1,31 +1,35 @@ #!/bin/bash -ex # install script for Travis-CI -pip install --upgrade pip - -pip_wheel() { - pip wheel --find-links="$HOME/.cache/wheels/" --wheel-dir="$HOME/.cache/wheels/" "$@" - pip install --no-index --find-links="$HOME/.cache/wheels/" "$@" -} - -pip_wheel -r testsuite/requirements.txt - PYVER=$(python -c 'import sys;print(".".join(str(v) for v in sys.version_info[0:2]))') -if [[ ${PYVER:0:1} == "2" && $PYVER != "2.7" ]]; then - pip_wheel unittest2 -fi +if [[ ${PYVER:0:1} == "2" && $PYVER != "2.7" && $PYVER != "2.6" ]]; then + pip install -r testsuite/requirements-legacy.txt +else + pip install --upgrade pip + + pip_wheel() { + pip wheel --find-links="$HOME/.cache/wheels/" --wheel-dir="$HOME/.cache/wheels/" "$@" + pip install --no-index --find-links="$HOME/.cache/wheels/" "$@" + } -if [[ "$WITH_OPTIONAL_DEPS" == "yes" ]]; then - pip_wheel PyYAML pyinotify boto pylibacl Jinja2 mercurial guppy cherrypy python-augeas + pip_wheel -r testsuite/requirements.txt - if [[ ${PYVER:0:1} == "2" ]]; then - pip_wheel cheetah m2crypto + if [[ $PYVER == "2.6" ]]; then + pip_wheel unittest2 + fi - if [[ $PYVER != "2.7" ]]; then - pip_wheel 'django<1.7' 'South<0.8' - else - pip_wheel django + if [[ "$WITH_OPTIONAL_DEPS" == "yes" ]]; then + pip_wheel PyYAML pyinotify boto pylibacl Jinja2 mercurial guppy cherrypy python-augeas + + if [[ ${PYVER:0:1} == "2" ]]; then + pip_wheel cheetah m2crypto + + if [[ $PYVER != "2.7" ]]; then + pip_wheel 'django<1.7' 'South<0.8' + else + pip_wheel django + fi fi fi fi -- cgit v1.2.3-1-g7c22 From 730ef612d9bbd9fc94a8e5d916831a91af033868 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 22 Mar 2017 21:03:21 +0100 Subject: travis-ci: Show skipped tests For the test environment with all optional dependencies, we want to run all tests. So let's print all skipped tests. --- testsuite/install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'testsuite/install.sh') diff --git a/testsuite/install.sh b/testsuite/install.sh index 13a2e9d01..604872a5e 100755 --- a/testsuite/install.sh +++ b/testsuite/install.sh @@ -20,8 +20,9 @@ else fi if [[ "$WITH_OPTIONAL_DEPS" == "yes" ]]; then - pip_wheel PyYAML pyinotify boto pylibacl Jinja2 mercurial guppy cherrypy python-augeas - + pip_wheel PyYAML pyinotify boto pylibacl Jinja2 mercurial guppy \ + cherrypy python-augeas nose-show-skipped + if [[ ${PYVER:0:1} == "2" ]]; then pip_wheel cheetah m2crypto -- cgit v1.2.3-1-g7c22 From 260ed3e5d8895bf74f7433b73c9e7c6e2fa9ee3b Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 23 Mar 2017 21:20:47 +0100 Subject: testsuite: Django should work on Python3, too --- testsuite/install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'testsuite/install.sh') diff --git a/testsuite/install.sh b/testsuite/install.sh index 604872a5e..076d91a4c 100755 --- a/testsuite/install.sh +++ b/testsuite/install.sh @@ -25,12 +25,12 @@ else if [[ ${PYVER:0:1} == "2" ]]; then pip_wheel cheetah m2crypto - - if [[ $PYVER != "2.7" ]]; then - pip_wheel 'django<1.7' 'South<0.8' - else - pip_wheel django - fi + fi + + if [[ $PYVER == "2.6" ]]; then + pip_wheel 'django<1.7' 'South<0.8' + else + pip_wheel django fi fi fi -- cgit v1.2.3-1-g7c22 From 9c21072a9d10744ef39c3fdc4a5a6a0797401810 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 16 Aug 2017 10:01:21 +0200 Subject: testsuite: Use older mercurial for python2.6 > Mercurial 4.2.2 is the last release to support Python 2.6. > Use this if you need to run Mercurial on old platforms and > you cannot update your Python installation. See also: https://www.mercurial-scm.org/wiki/SupportedPythonVersions --- testsuite/install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'testsuite/install.sh') diff --git a/testsuite/install.sh b/testsuite/install.sh index 076d91a4c..1bd214936 100755 --- a/testsuite/install.sh +++ b/testsuite/install.sh @@ -20,7 +20,7 @@ else fi if [[ "$WITH_OPTIONAL_DEPS" == "yes" ]]; then - pip_wheel PyYAML pyinotify boto pylibacl Jinja2 mercurial guppy \ + pip_wheel PyYAML pyinotify boto pylibacl Jinja2 guppy \ cherrypy python-augeas nose-show-skipped if [[ ${PYVER:0:1} == "2" ]]; then @@ -28,9 +28,9 @@ else fi if [[ $PYVER == "2.6" ]]; then - pip_wheel 'django<1.7' 'South<0.8' + pip_wheel 'django<1.7' 'South<0.8' 'mercurial<4.3' else - pip_wheel django + pip_wheel django mercurial fi fi fi -- cgit v1.2.3-1-g7c22 From 870ce516689f55f20ffd569786951ba0311df88a Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 17 Aug 2017 16:47:33 +0200 Subject: testsuite: Requirements for Python3 --- testsuite/install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'testsuite/install.sh') diff --git a/testsuite/install.sh b/testsuite/install.sh index 1bd214936..b8220d217 100755 --- a/testsuite/install.sh +++ b/testsuite/install.sh @@ -13,10 +13,11 @@ else pip install --no-index --find-links="$HOME/.cache/wheels/" "$@" } - pip_wheel -r testsuite/requirements.txt - if [[ $PYVER == "2.6" ]]; then + pip_wheel -r testsuite/requirements-26.txt pip_wheel unittest2 + else + pip_wheel -r testsuite/requirements.txt fi if [[ "$WITH_OPTIONAL_DEPS" == "yes" ]]; then -- cgit v1.2.3-1-g7c22 From 74f37ee90939e3deb811fe4e44c9aeda4180c87e Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 17 Aug 2017 17:09:14 +0200 Subject: testsuite: guppy does not support Python3 --- testsuite/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'testsuite/install.sh') diff --git a/testsuite/install.sh b/testsuite/install.sh index b8220d217..4ea811de0 100755 --- a/testsuite/install.sh +++ b/testsuite/install.sh @@ -21,11 +21,11 @@ else fi if [[ "$WITH_OPTIONAL_DEPS" == "yes" ]]; then - pip_wheel PyYAML pyinotify boto pylibacl Jinja2 guppy \ + pip_wheel PyYAML pyinotify boto pylibacl Jinja2 \ cherrypy python-augeas nose-show-skipped if [[ ${PYVER:0:1} == "2" ]]; then - pip_wheel cheetah m2crypto + pip_wheel cheetah m2crypto guppy fi if [[ $PYVER == "2.6" ]]; then -- cgit v1.2.3-1-g7c22 From bba671cf8df8dfadeec926acb7a3d15d07946dc7 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 17 Aug 2017 17:11:04 +0200 Subject: testsuite: Use cheetah3 if possible cheetah3 is a fork of cheetah for Python2.7 and Python3. --- testsuite/install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'testsuite/install.sh') diff --git a/testsuite/install.sh b/testsuite/install.sh index 4ea811de0..d2fd20acb 100755 --- a/testsuite/install.sh +++ b/testsuite/install.sh @@ -25,13 +25,13 @@ else cherrypy python-augeas nose-show-skipped if [[ ${PYVER:0:1} == "2" ]]; then - pip_wheel cheetah m2crypto guppy + pip_wheel m2crypto guppy fi if [[ $PYVER == "2.6" ]]; then - pip_wheel 'django<1.7' 'South<0.8' 'mercurial<4.3' + pip_wheel 'django<1.7' 'South<0.8' 'mercurial<4.3' cheetah else - pip_wheel django mercurial + pip_wheel django mercurial cheetah3 fi fi fi -- cgit v1.2.3-1-g7c22 From 47ebf4e59cf84295aa072d909fe3312ff57e305b Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 17 Aug 2017 17:32:22 +0200 Subject: testsuite: Fix building of m2crypto with Python2.6 --- testsuite/install.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'testsuite/install.sh') diff --git a/testsuite/install.sh b/testsuite/install.sh index d2fd20acb..758d5bdf8 100755 --- a/testsuite/install.sh +++ b/testsuite/install.sh @@ -24,13 +24,18 @@ else pip_wheel PyYAML pyinotify boto pylibacl Jinja2 \ cherrypy python-augeas nose-show-skipped - if [[ ${PYVER:0:1} == "2" ]]; then - pip_wheel m2crypto guppy - fi - if [[ $PYVER == "2.6" ]]; then - pip_wheel 'django<1.7' 'South<0.8' 'mercurial<4.3' cheetah + pip install \ + --global-option='build_ext' \ + --global-option='--include-dirs=/usr/include/x86_64-linux-gnu' \ + m2crypto + + pip_wheel 'django<1.7' 'South<0.8' 'mercurial<4.3' cheetah guppy else + if [[ $PYVER == "2.7" ]]; then + pip_wheel m2crypto guppy + fi + pip_wheel django mercurial cheetah3 fi fi -- cgit v1.2.3-1-g7c22 From 3b372355f0d8e6799abc29f149ee479a0b89095e Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 17 Aug 2017 18:09:57 +0200 Subject: testsuite: Bump pylint version for Python3 --- testsuite/install.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'testsuite/install.sh') diff --git a/testsuite/install.sh b/testsuite/install.sh index 758d5bdf8..01c5199f2 100755 --- a/testsuite/install.sh +++ b/testsuite/install.sh @@ -18,6 +18,11 @@ else pip_wheel unittest2 else pip_wheel -r testsuite/requirements.txt + + if [[ ${PYVER:0:1} == "3" ]]; then + # TODO: Move to "requirements.txt" if all the new errors are fixed. + pip_wheel 'pylint>1.4' + fi fi if [[ "$WITH_OPTIONAL_DEPS" == "yes" ]]; then -- cgit v1.2.3-1-g7c22 From 0fdabbcb4668d5f70f76c08a6e3216c5542e7457 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 17 Aug 2017 21:32:52 +0200 Subject: travis-ci: Fix "with_system_site_packages" The "with_system_site_packages" virtualenv seems to be missing the pymodules directory containing python modules installed with the python-support debian helper. So we use the default environment and manually add the references to the system-wide python packages. --- testsuite/install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'testsuite/install.sh') diff --git a/testsuite/install.sh b/testsuite/install.sh index 01c5199f2..af07de0a9 100755 --- a/testsuite/install.sh +++ b/testsuite/install.sh @@ -2,6 +2,7 @@ # install script for Travis-CI PYVER=$(python -c 'import sys;print(".".join(str(v) for v in sys.version_info[0:2]))') +SITE_PACKAGES=$(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())') if [[ ${PYVER:0:1} == "2" && $PYVER != "2.7" && $PYVER != "2.6" ]]; then pip install -r testsuite/requirements-legacy.txt @@ -46,6 +47,15 @@ else fi fi +# Use system site-packages and pymodules +if [[ "$WITH_SYSTEM_SITE_PACKAGES" == "yes" ]]; then + cat < "$SITE_PACKAGES/system-packages.pth" +/usr/lib/python$PYVER/site-packages/ +/usr/lib/python$PYVER/dist-packages/ +/usr/lib/pymodules/python$PYVER/ +EOF +fi + # Setup the local xml schema cache download_schema() { if [[ ! -e "$1" ]]; then -- cgit v1.2.3-1-g7c22