diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-04-18 12:05:10 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-04-18 12:19:33 +0200 |
commit | 29b59f2e87d1b00ab6a1f4cc4e960603974992bc (patch) | |
tree | 4f1ee3ef9b8a35548c9062e7b01cae5deade1788 /solenv | |
parent | testcase for 35b75ed510f49ff64cd86b38e228c2b5b9a9f3fc (diff) | |
download | core-29b59f2e87d1b00ab6a1f4cc4e960603974992bc.tar.gz core-29b59f2e87d1b00ab6a1f4cc4e960603974992bc.zip |
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
Diffstat (limited to 'solenv')
-rwxr-xr-x | solenv/bin/gdb-core-bt.sh | 3 | ||||
-rw-r--r-- | solenv/gbuild/CppunitTest.mk | 4 | ||||
-rw-r--r-- | solenv/gbuild/platform/solaris.mk | 2 | ||||
-rw-r--r-- | solenv/gbuild/platform/unxgcc.mk | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/solenv/bin/gdb-core-bt.sh b/solenv/bin/gdb-core-bt.sh index 4cbcf52a54b4..52ed3a3b2533 100755 --- a/solenv/bin/gdb-core-bt.sh +++ b/solenv/bin/gdb-core-bt.sh @@ -30,6 +30,7 @@ EXECUTABLE=${1} COREDIR=${2} +EXITCODE=${3} if test -n "$(which gdb)" then @@ -45,7 +46,7 @@ then rm "$GDBCOMMANDFILE" echo exit 0 - else + elif [ $EXITCODE -ge 128 ]; then echo echo "No core file identified in directory ${COREDIR}" echo "To show backtraces for crashes during test execution," diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk index 61cd7177550c..a4478eea355d 100644 --- a/solenv/gbuild/CppunitTest.mk +++ b/solenv/gbuild/CppunitTest.mk @@ -97,9 +97,9 @@ $(call gb_CppunitTest_get_target,%) :| $(gb_CppunitTest_CPPTESTDEPS) $(call gb_CppunitTest__make_args) \ $(if $(gb_CppunitTest__interactive),, \ > $@.log 2>&1 \ - || (cat $@.log && $(UNIT_FAILED_MSG) \ + || (RET=$$? && cat $@.log && $(UNIT_FAILED_MSG) \ $(if $(value gb_CppunitTest_postprocess), \ - && $(call gb_CppunitTest_postprocess,$(gb_CppunitTest_CPPTESTCOMMAND),$@.core)) \ + && $(call gb_CppunitTest_postprocess,$(gb_CppunitTest_CPPTESTCOMMAND),$@.core,$$RET)) \ && false)))) define gb_CppunitTest_CppunitTest diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk index cfcca9e0a470..965b2ef22718 100644 --- a/solenv/gbuild/platform/solaris.mk +++ b/solenv/gbuild/platform/solaris.mk @@ -342,7 +342,7 @@ $(call gb_LinkTarget_get_target,$(2)) : RPATH := endef define gb_CppunitTest_postprocess -$(SRCDIR)/solenv/bin/gdb-core-bt.sh $(1) $(2) +$(SRCDIR)/solenv/bin/gdb-core-bt.sh $(1) $(2) $(3) endef # JunitTest class diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index 0bcd36687871..ab54e27e2e14 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -339,7 +339,7 @@ $(call gb_LinkTarget_get_target,$(2)) : RPATH := endef define gb_CppunitTest_postprocess -$(SRCDIR)/solenv/bin/gdb-core-bt.sh $(1) $(2) +$(SRCDIR)/solenv/bin/gdb-core-bt.sh $(1) $(2) $(3) endef # JunitTest class |