From 868c7e7c91a5d3a918e089b322d7174869f455ea Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Tue, 21 Nov 2017 12:08:55 +0200 Subject: [PATCH] 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 --- .test_runner_config.yaml | 4 +++- .test_runner_config_py3_temp.yaml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.test_runner_config.yaml b/.test_runner_config.yaml index 928f64a14..febc38d12 100644 --- a/.test_runner_config.yaml +++ b/.test_runner_config.yaml @@ -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 diff --git a/.test_runner_config_py3_temp.yaml b/.test_runner_config_py3_temp.yaml index 00d1de79e..bdc1d0e33 100644 --- a/.test_runner_config_py3_temp.yaml +++ b/.test_runner_config_py3_temp.yaml @@ -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