Date: prev next · Thread: first prev next last
2020 Archives by date, by thread · List index


On 12/07/2020 18:45, Mike Kaganski wrote:
On 11.07.2020 2:35, Mike Kaganski wrote:
In current master (at least a week, and still the same after pull just
now) I see 100% reproducible failure of make CppunitTest_sw_ooxmlexport4:

$ /opt/lo/bin/make CppunitTest_sw_ooxmlexport4
...
test_Tdf115030::Load_Reload_Verify finished in: 1500ms
C:/lo/src/core/test/source/xmltesttools.cxx(194) : error : Assertion
Test name: testComboBoxControl::Load_Reload_Verify
equality assertion failed
- Expected: manolo
- Actual  : Manolo
- In <file:///C:/cygwin64/tmp/lu23416a8g0y3.tmp>, XPath contents of child does not match

Failures !!!
Run: 85   Failure total: 1   Failures: 1   Errors: 0

This test succeeds normally though, when run individually:

$ /opt/lo/bin/make CppunitTest_sw_ooxmlexport4 CPPUNIT_TEST_NAME=testComboBoxControl

I was able to narrow down the problem to --disable-pch in my config.

I had played with the includes from PCH, and could find out that
including <boost/iterator/iterator_concepts.hpp> in the beginning of
sw/qa/extras/ooxmlexport/ooxmlexport4.cxx allows the test to pass. I
couldn't limit the includes further: only including what's included
inside that boost header does not allow the test to pass. But I don't
understand what does that mean (some ODR violation? some missing virtual
overridden function?...), and don't see where to look next. Does someone
have any ideas?

I think the issue is in what relative order the three individual tests

DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testComboBoxControl, "combobox-control.docx")
{
    // check XML
    xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
    assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dropDownList/w:listItem[1]", "value", 
"manolo");
    assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dropDownList/w:listItem[2]", "value", 
"pepito");
    assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r/w:t", "manolo");

    // check imported control
    verifyComboBoxExport(getShapes() == 0);
}

CPPUNIT_TEST_FIXTURE(Test, tdf134043_ImportComboBoxAsDropDown_true)
{
    std::shared_ptr< comphelper::ConfigurationChanges > 
batch(comphelper::ConfigurationChanges::create());
    officecfg::Office::Writer::Filter::Import::DOCX::ImportComboBoxAsDropDown::set(true, batch);
    batch->commit();

    load(mpTestDocumentPath, "combobox-control.docx");
    verifyComboBoxExport(true);
}

CPPUNIT_TEST_FIXTURE(Test, tdf134043_ImportComboBoxAsDropDown_false)
{
    std::shared_ptr< comphelper::ConfigurationChanges > 
batch(comphelper::ConfigurationChanges::create());
    officecfg::Office::Writer::Filter::Import::DOCX::ImportComboBoxAsDropDown::set(false, batch);
    batch->commit();

    load(mpTestDocumentPath, "combobox-control.docx");
    verifyComboBoxExport(false);
}

(that were added to sw/qa/extras/ooxmlexport/ooxmlexport4.cxx with <https://git.libreoffice.org/core/+/7b00fbddfb1cd55a68ed7481ebd4a5d5f60c6128%5E!/> "tdf#134043 DOCX import: new unit tests: ComboBox to DropDown") are executed:

With just --disable-pch, the order for me happens to be 2, 3, 1; while with an additional

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index 7fe92c72eede..5fad8bd08bdf 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -7,6 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
+#include <boost/iterator/iterator_concepts.hpp>
 #include <swmodeltestbase.hxx>
#include <com/sun/star/awt/XBitmap.hpp>

the order happens to change to 2, 1, 3. Note how tests 2 and 3 modify global state, which presumably makes a different for the (failing) test 1.

Serge, can you see to get that fixed?


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.