Skip to content

Commit

Permalink
SHOW CORE DUMPS #3
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Feb 11, 2024
1 parent 63a09b4 commit fd547fe
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 32 deletions.
24 changes: 2 additions & 22 deletions ci/tests/run-core-tests.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
#!/bin/bash
set -uo pipefail
set -euo pipefail

source "$(dirname "$BASH_SOURCE")/common.sh"

enable_core_dumps

BUILD_DIR=${1-${PWD}}

executable=${BUILD_DIR}/core_test$(get_exec_extension)
"${executable}"
status=$?

if [ $status -ne 0 ]; then
echo "Test failed"

# Show core dumps
export EXECUTABLE=${executable}
"$(dirname "$BASH_SOURCE")/show-core-dumps.sh"

exit $status
else
exit 0
fi
$(dirname "$BASH_SOURCE")/run-tests.sh core_test
6 changes: 1 addition & 5 deletions ci/tests/run-qt-tests.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#!/bin/bash
set -euo pipefail

source "$(dirname "$BASH_SOURCE")/common.sh"

BUILD_DIR=${1-${PWD}}

# Alpine doesn't offer an xvfb
xvfb_run_()
{
Expand All @@ -20,4 +16,4 @@ xvfb_run_()
return ${res}
}

xvfb_run_ ${BUILD_DIR}/qt_test$(get_exec_extension)
xvfb_run_ $(dirname "$BASH_SOURCE")/run-tests.sh qt_test
6 changes: 1 addition & 5 deletions ci/tests/run-rpc-tests.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#!/bin/bash
set -euo pipefail

source "$(dirname "$BASH_SOURCE")/common.sh"

BUILD_DIR=${1-${PWD}}

${BUILD_DIR}/rpc_test$(get_exec_extension)
$(dirname "$BASH_SOURCE")/run-tests.sh rpc_test
25 changes: 25 additions & 0 deletions ci/tests/run-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
set -uo pipefail

source "$(dirname "$BASH_SOURCE")/common.sh"

enable_core_dumps

TARGET=$1
echo "Running tests for target: ${TARGET}"

executable=${BUILD_DIR}/${TARGET}$(get_exec_extension)
"${executable}"
status=$?

if [ $status -ne 0 ]; then
echo "Test failed"

# Show core dumps
export EXECUTABLE=${executable}
"$(dirname "$BASH_SOURCE")/show-core-dumps.sh"

exit $status
else
exit 0
fi

0 comments on commit fd547fe

Please sign in to comment.