summaryrefslogtreecommitdiff
path: root/solenv/gbuild
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-11-25 04:16:28 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-11-25 04:16:28 +0100
commit74f44646ba5b400cc39d78940677f136711459b5 (patch)
tree34e3f946ee8184fc70580b78e1f412ecf9acac95 /solenv/gbuild
parent31012ab9d7035f942486c87ecc1a79b4d6579975 (diff)
gdb stacktraces for subsequentchecks
Diffstat (limited to 'solenv/gbuild')
-rw-r--r--solenv/gbuild/platform/IOS_ARM_GCC.mk1
-rw-r--r--solenv/gbuild/platform/macosx.mk1
-rw-r--r--solenv/gbuild/platform/solaris.mk1
-rw-r--r--solenv/gbuild/platform/unxgcc.mk2
-rwxr-xr-xsolenv/gbuild/platform/unxgcc_gdbforjunit.sh52
5 files changed, 57 insertions, 0 deletions
diff --git a/solenv/gbuild/platform/IOS_ARM_GCC.mk b/solenv/gbuild/platform/IOS_ARM_GCC.mk
index 8f013fbc6341..f8d44546aded 100644
--- a/solenv/gbuild/platform/IOS_ARM_GCC.mk
+++ b/solenv/gbuild/platform/IOS_ARM_GCC.mk
@@ -302,6 +302,7 @@ $(call gb_JunitTest_get_target,$(1)) : DEFS := \
-Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:$(OUTDIR)/installation/opt/LibreOffice.app/Contents/MacOS/soffice}" \
-Dorg.openoffice.test.arg.env=DYLD_LIBRARY_PATH \
-Dorg.openoffice.test.arg.user=file://$(call gb_JunitTest_get_userdir,$(1)) \
+ -Dorg.openoffice.test.arg.workdir=$(call gb_JunitTest_get_userdir,$(1)) \
endef
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 4b84db4f14d4..3beb09365ece 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -383,6 +383,7 @@ $(call gb_JunitTest_get_target,$(1)) : DEFS := \
-Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:$(OUTDIR)/installation/opt/LibreOffice.app/Contents/MacOS/soffice}" \
-Dorg.openoffice.test.arg.env=DYLD_LIBRARY_PATH \
-Dorg.openoffice.test.arg.user=file://$(call gb_JunitTest_get_userdir,$(1)) \
+ -Dorg.openoffice.test.arg.workdir=$(call gb_JunitTest_get_userdir,$(1)) \
endef
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 28dbba8c8517..a51edbfb63ed 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -367,6 +367,7 @@ $(call gb_JunitTest_get_target,$(1)) : DEFS := \
-Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:$(OUTDIR)/installation/opt/program/soffice}" \
-Dorg.openoffice.test.arg.env=LD_LIBRARY_PATH \
-Dorg.openoffice.test.arg.user=file://$(call gb_JunitTest_get_userdir,$(1)) \
+ -Dorg.openoffice.test.arg.workdir=$(call gb_JunitTest_get_userdir,$(1)) \
endef
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 7df93f02151f..8c8380c5acda 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -382,6 +382,8 @@ $(call gb_JunitTest_get_target,$(1)) : DEFS := \
-Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:$(OUTDIR)/installation/opt/program/soffice}" \
-Dorg.openoffice.test.arg.env=$(gb_Helper_LIBRARY_PATH_VAR) \
-Dorg.openoffice.test.arg.user=file://$(call gb_JunitTest_get_userdir,$(1)) \
+ -Dorg.openoffice.test.arg.workdir=$(call gb_JunitTest_get_userdir,$(1)) \
+ -Dorg.openoffice.test.arg.postprocesscommand=$(GBUILDDIR)/platform/unxgcc_gdbforjunit.sh \
endef
diff --git a/solenv/gbuild/platform/unxgcc_gdbforjunit.sh b/solenv/gbuild/platform/unxgcc_gdbforjunit.sh
new file mode 100755
index 000000000000..ced044404f54
--- /dev/null
+++ b/solenv/gbuild/platform/unxgcc_gdbforjunit.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+#
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+# Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 Canonical,
+# Ltd. . All Rights Reserved.
+#
+# Major Contributor(s):
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+#
+
+# we expect our work directory to be where soffice had been started
+# $(1) should be the path to the executable
+
+OFFICEFILE=${1}
+WORKDIR=${2}
+
+if test -e ${WORKDIR}/core
+then
+ STORELOCATION=`mktemp --tmpdir=${WORKDIR} core.XXXX`
+ echo "Found a core dump at ${WORKDIR}, moving it to ${STORELOCATION}"
+ mv ${WORKDIR}/core ${STORELOCATION}
+ echo "Stacktrace:"
+ GDBCOMMANDFILE=`mktemp`
+ echo "bt" > ${GDBCOMMANDFILE}
+ gdb -x $GDBCOMMANDFILE --batch ${OFFICEFILE}.bin ${STORELOCATION}
+ rm ${GDBCOMMANDFILE}
+ exit 1
+else
+ exit 0
+fi
+
+# vim: set et sw=4 sts=4: