mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
When 'make check' is run, automake produces logs for each test to be ran. Collect all the logs from the tests. Also prepare the template to quickly enable use of gdb with traceback in case a test is crashing. To use it, add LOG_COMPILE definition to the 'make' line. Reviewed-By: Christian Heimes <cheimes@redhat.com>
78 lines
2.3 KiB
YAML
78 lines
2.3 KiB
YAML
#
|
|
# Copyright (C) 2017 FreeIPA Contributors see COPYING for license
|
|
#
|
|
|
|
# Configuration file for the test runner used in Travis CI
|
|
|
|
container:
|
|
detach: true
|
|
hostname: master.ipa.test
|
|
working_dir: /freeipa
|
|
host:
|
|
binds:
|
|
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
|
- /dev/urandom:/dev/random:ro
|
|
privileged: true
|
|
security_opt:
|
|
- label:disable
|
|
tmpfs:
|
|
- /tmp
|
|
- /run
|
|
server:
|
|
domain: ipa.test
|
|
password: Secret123
|
|
realm: IPA.TEST
|
|
steps:
|
|
build:
|
|
- make V=0 ${make_target} LOG_COMPILE='gdb -return-child-result -ex run -ex "thread apply all bt" -ex "quit" --args'
|
|
builddep:
|
|
- rm -rf /var/cache/dnf/*
|
|
- "dnf makecache || :"
|
|
- dnf builddep -y ${builddep_opts} -D "with_wheels 1" --spec freeipa.spec.in --best --allowerasing
|
|
- dnf install -y gdb
|
|
cleanup:
|
|
- chown -R ${uid}:${gid} ${container_working_dir}
|
|
- journalctl -b --no-pager > systemd_journal.log
|
|
- >
|
|
tar --ignore-failed-read -cvf ${container_working_dir}/var_log.tar
|
|
/var/log/dirsrv
|
|
/var/log/httpd
|
|
/var/log/ipa*
|
|
/var/log/krb5kdc.log
|
|
/var/log/pki
|
|
systemd_journal.log
|
|
`find daemons -name '*.log' -print`
|
|
- chown ${uid}:${gid} ${container_working_dir}/var_log.tar
|
|
configure:
|
|
- ./autogen.sh
|
|
install_packages:
|
|
- dnf install -y ${container_working_dir}/dist/rpms/*.rpm --best --allowerasing
|
|
install_server:
|
|
- ipa-server-install -U --domain ${server_domain} --realm ${server_realm} -p ${server_password}
|
|
-a ${server_password} --setup-dns --setup-kra --auto-forwarders
|
|
- sed -ri "s/mode = production/mode = development/" /etc/ipa/default.conf
|
|
- systemctl restart httpd.service
|
|
lint:
|
|
- make PYTHON=/usr/bin/python2 V=0 lint
|
|
- make PYTHON=/usr/bin/python3 V=0 pylint
|
|
tox:
|
|
# just run one pylint and one Python 3 target (time/coverage trade-off)
|
|
- tox -e py27,py36,pypi,pylint3
|
|
prepare_tests:
|
|
- echo ${server_password} | kinit admin && ipa ping
|
|
- cp -r /etc/ipa/* ~/.ipa/
|
|
- echo ${server_password} > ~/.ipa/.dmpw
|
|
- echo 'wait_for_dns=5' >> ~/.ipa/default.conf
|
|
run_tests:
|
|
- ipa-test-config --help
|
|
- ipa-test-task --help
|
|
- ipa-run-tests ${tests_ignore} -k-test_dns_soa ${tests_verbose} ${path}
|
|
- '! grep -n -C5 BytesWarning /var/log/httpd/error_log'
|
|
- ipa-server-install --uninstall -U
|
|
tests:
|
|
ignore:
|
|
- test_integration
|
|
- test_webui
|
|
- test_ipapython/test_keyring.py
|
|
verbose: true
|