[Libreoffice-commits] core.git: 2 commits - solenv/bin solenv/gbuild sw/qa
Miklos Vajna
vmiklos at suse.cz
Thu Apr 18 03:19:54 PDT 2013
solenv/bin/gdb-core-bt.sh | 3 ++-
solenv/gbuild/CppunitTest.mk | 4 ++--
solenv/gbuild/platform/solaris.mk | 2 +-
solenv/gbuild/platform/unxgcc.mk | 2 +-
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 11 +++++++++++
5 files changed, 17 insertions(+), 5 deletions(-)
New commits:
commit 29b59f2e87d1b00ab6a1f4cc4e960603974992bc
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Thu Apr 18 12:05:10 2013 +0200
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
diff --git a/solenv/bin/gdb-core-bt.sh b/solenv/bin/gdb-core-bt.sh
index 4cbcf52..52ed3a3 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 61cd717..a4478ee 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 cfcca9e..965b2ef 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 0bcd366..ab54e27 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
commit 54d0673ba422d6408d8b2d39493a3a7bb4f56037
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Thu Apr 18 11:51:58 2013 +0200
testcase for 35b75ed510f49ff64cd86b38e228c2b5b9a9f3fc
Change-Id: Ib734717cdc293b3921c94f93b1d6d0d5e07120d5
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 7c4051c..b8addac 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -124,6 +124,7 @@ public:
void testFdo60922();
void testFdo59273();
void testTableWidth();
+ void testConditionalstylesTbllook();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -199,6 +200,7 @@ void Test::run()
{"fdo60922.docx", &Test::testFdo60922},
{"fdo59273.docx", &Test::testFdo59273},
{"table_width.docx", &Test::testTableWidth},
+ {"conditionalstyles-tbllook.docx", &Test::testConditionalstylesTbllook},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1313,6 +1315,15 @@ void Test::testTableWidth()
CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<sal_Bool>(xTables->getByIndex(0), "IsWidthRelative")));
}
+void Test::testConditionalstylesTbllook()
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ // Background was -1.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0x7F7F7F), getProperty<sal_Int32>(xTable->getCellByName("A1"), "BackColor"));
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();
More information about the Libreoffice-commits
mailing list