Kaydet (Commit) 29b59f2e authored tarafından Miklos Vajna's avatar Miklos Vajna

gdb-core-bt: don't talk about core files without a reason.

When exit code is <128, then the test probably just failed, it did not
get a SIGSEGV or similar signal, so it's expected that no core file is
created.

Change-Id: Ie9e3599bd6738c04afacb95000d09f9dd2a5c426
üst 54d0673b
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
EXECUTABLE=${1} EXECUTABLE=${1}
COREDIR=${2} COREDIR=${2}
EXITCODE=${3}
if test -n "$(which gdb)" if test -n "$(which gdb)"
then then
...@@ -45,7 +46,7 @@ then ...@@ -45,7 +46,7 @@ then
rm "$GDBCOMMANDFILE" rm "$GDBCOMMANDFILE"
echo echo
exit 0 exit 0
else elif [ $EXITCODE -ge 128 ]; then
echo echo
echo "No core file identified in directory ${COREDIR}" echo "No core file identified in directory ${COREDIR}"
echo "To show backtraces for crashes during test execution," echo "To show backtraces for crashes during test execution,"
......
...@@ -97,9 +97,9 @@ $(call gb_CppunitTest_get_target,%) :| $(gb_CppunitTest_CPPTESTDEPS) ...@@ -97,9 +97,9 @@ $(call gb_CppunitTest_get_target,%) :| $(gb_CppunitTest_CPPTESTDEPS)
$(call gb_CppunitTest__make_args) \ $(call gb_CppunitTest__make_args) \
$(if $(gb_CppunitTest__interactive),, \ $(if $(gb_CppunitTest__interactive),, \
> $@.log 2>&1 \ > $@.log 2>&1 \
|| (cat $@.log && $(UNIT_FAILED_MSG) \ || (RET=$$? && cat $@.log && $(UNIT_FAILED_MSG) \
$(if $(value gb_CppunitTest_postprocess), \ $(if $(value gb_CppunitTest_postprocess), \
&& $(call gb_CppunitTest_postprocess,$(gb_CppunitTest_CPPTESTCOMMAND),$@.core)) \ && $(call gb_CppunitTest_postprocess,$(gb_CppunitTest_CPPTESTCOMMAND),$@.core,$$RET)) \
&& false)))) && false))))
define gb_CppunitTest_CppunitTest define gb_CppunitTest_CppunitTest
......
...@@ -342,7 +342,7 @@ $(call gb_LinkTarget_get_target,$(2)) : RPATH := ...@@ -342,7 +342,7 @@ $(call gb_LinkTarget_get_target,$(2)) : RPATH :=
endef endef
define gb_CppunitTest_postprocess define gb_CppunitTest_postprocess
$(SRCDIR)/solenv/bin/gdb-core-bt.sh $(1) $(2) $(SRCDIR)/solenv/bin/gdb-core-bt.sh $(1) $(2) $(3)
endef endef
# JunitTest class # JunitTest class
......
...@@ -339,7 +339,7 @@ $(call gb_LinkTarget_get_target,$(2)) : RPATH := ...@@ -339,7 +339,7 @@ $(call gb_LinkTarget_get_target,$(2)) : RPATH :=
endef endef
define gb_CppunitTest_postprocess define gb_CppunitTest_postprocess
$(SRCDIR)/solenv/bin/gdb-core-bt.sh $(1) $(2) $(SRCDIR)/solenv/bin/gdb-core-bt.sh $(1) $(2) $(3)
endef endef
# JunitTest class # JunitTest class
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment