summaryrefslogtreecommitdiffstats
path: root/.travis.yml
diff options
context:
space:
mode:
authorMartin Babinsky <mbabinsk@redhat.com>2016-11-30 10:37:46 +0100
committerMartin Basti <mbasti@redhat.com>2016-12-07 10:32:44 +0100
commit6d6fbc010ec2b607a11e0ff69c8cbdcd3c1d47d9 (patch)
treed735f60e95b5c932d43f8aaa8e8fd14f04090db7 /.travis.yml
parent5ecaea6bc4f49c2665597ca38fc52f4fae8a9d24 (diff)
downloadfreeipa-6d6fbc010ec2b607a11e0ff69c8cbdcd3c1d47d9.tar.gz
freeipa-6d6fbc010ec2b607a11e0ff69c8cbdcd3c1d47d9.tar.xz
freeipa-6d6fbc010ec2b607a11e0ff69c8cbdcd3c1d47d9.zip
Use ipa-docker-test-runner to run tests in Travis CI
https://github.com/martbab/ipa-docker-test-runner is now used to run the following tasks in Travis CI: * pull in a FreeIPA test runner Docker image * configure/make lint/make rpms * install rpms * install FreeIPA server and KRA * run out-of-tree tests For performance reasons (last two steps are very time-consuming) the available tests were split roughly in half and are run as two separate jobs to speed up the process. AD trust is not installed as part of tests since the enabled compat plugin causes false negative errors. Reviewed-By: Stanislav Laznicka <slaznick@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com>
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml36
1 files changed, 32 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml
index 44a2ee684..e870213bb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,16 +1,44 @@
services:
- docker
+env:
+ global:
+ - TEST_RUNNER_IMAGE="martbab/freeipa-fedora-test-runner:master-latest"
+ matrix:
+ - TESTS_TO_RUN="test_xmlrpc/test_[a-k]*.py"
+ - >
+ TESTS_TO_RUN="test_cmdline
+ test_install
+ test_ipalib
+ test_ipapython
+ test_ipaserver
+ test_pkcs10
+ test_xmlrpc/test_[l-z]*.py"
before_install:
- pip install pep8
+ - >
+ pip3 install
+ git+https://github.com/freeipa/ipa-docker-test-runner@release-0-2-0
script:
- >
if [[ "$TRAVIS_EVENT_TYPE" == "pull_request" ]];
then
- git diff origin/${TRAVIS_BRANCH} -U0 | pep8 --diff;
+ git diff origin/${TRAVIS_BRANCH} -U0 | pep8 --diff &> pep8_errors.log;
fi
+ - "pushd ipatests; test_set=`ls -d -1 $TESTS_TO_RUN 2> /dev/null`; popd"
+ # use travis_wait so that long running tasks (tests) which produce no
+ # output do not cause premature termination of the build
+ - "docker pull ${TEST_RUNNER_IMAGE}"
- >
- docker run -v $PWD:/freeipa -w /freeipa
- martbab/freeipa-fedora-builder:${TRAVIS_BRANCH}-latest
- /bin/bash -c 'dnf builddep -y -D "with_lint 1" --spec freeipa.spec.in && autoreconf -i && ./configure && make lint && make rpms'
+ travis_wait 50
+ ipa-docker-test-runner -l ci_results_${TRAVIS_BRANCH}.log
+ -c .test_runner_config.yaml
+ --container-image ${TEST_RUNNER_IMAGE}
+ --git-repo ${TRAVIS_BUILD_DIR}
+ run-tests $test_set
+after_failure:
+ - echo "Test runner output:"
+ - tail -n 5000 ci_results_${TRAVIS_BRANCH}.log
+ - echo "PEP-8 errors:"
+ - cat pep8_errors.log