From 8b52776cc9e6c06e2b7c33a817d650c81f56e581 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Fri, 13 Oct 2023 15:26:00 -0500 Subject: [PATCH] Generate back traces Signed-off-by: Addisu Z. Taddese --- .../docker/lib/_generic_linux_compilation_build.sh.bash | 9 ++++++++- jenkins-scripts/lib/dependencies_archive.sh | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/jenkins-scripts/docker/lib/_generic_linux_compilation_build.sh.bash b/jenkins-scripts/docker/lib/_generic_linux_compilation_build.sh.bash index 9d63185d9..9272afc67 100644 --- a/jenkins-scripts/docker/lib/_generic_linux_compilation_build.sh.bash +++ b/jenkins-scripts/docker/lib/_generic_linux_compilation_build.sh.bash @@ -79,7 +79,7 @@ cd $WORKSPACE [[ ! -d $WORKSPACE/build ]] && mkdir -p $WORKSPACE/build cd $WORKSPACE/build cmake $WORKSPACE/${SOFTWARE_DIR} ${BUILDING_EXTRA_CMAKE_PARAMS} \ - -DCMAKE_INSTALL_PREFIX=/usr + -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr echo '# END SECTION' echo '# BEGIN SECTION: compiling' @@ -97,6 +97,13 @@ if $GENERIC_ENABLE_TESTS; then init_stopwatch TEST mkdir -p \$HOME make test ARGS="-VV ${BUILDING_EXTRA_MAKETEST_PARAMS}" || true + if [[ -d $WORKSPACE/core_dumps ]]; then + cd $WORKSPACE/core_dumps + for corefile in core.* + do + gdb --batch -ex "thread apply all bt" --core $corefile > ${corefile}_backtrace.txt + done + fi stop_stopwatch TEST echo '# END SECTION' else diff --git a/jenkins-scripts/lib/dependencies_archive.sh b/jenkins-scripts/lib/dependencies_archive.sh index d52c69bba..b7dd95a04 100644 --- a/jenkins-scripts/lib/dependencies_archive.sh +++ b/jenkins-scripts/lib/dependencies_archive.sh @@ -36,6 +36,7 @@ fi # gnupg apt-key requires gnupg, gnupg2 or gnupg1 BASE_DEPENDENCIES="build-essential \\ cmake \\ + gdb \\ debhelper \\ mesa-utils \\ x11-utils \\