travis-ci: collect logs from cmocka tests

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>
This commit is contained in:
Alexander Bokovoy 2017-11-21 12:08:55 +02:00
parent 8ec4b8159e
commit 868c7e7c91
2 changed files with 6 additions and 2 deletions

View File

@ -24,11 +24,12 @@ server:
realm: IPA.TEST
steps:
build:
- make V=0 ${make_target}
- 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
@ -40,6 +41,7 @@ steps:
/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

View File

@ -26,11 +26,12 @@ server:
realm: IPA.TEST
steps:
build:
- make V=0 ${make_target}
- 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} --spec freeipa.spec.in --best --allowerasing
- dnf install -y gdb
cleanup:
- chown -R ${uid}:${gid} ${container_working_dir}
- >
@ -41,6 +42,7 @@ steps:
/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