reportdesign/Module_reportdesign.mk             |   12 +++++-------
 reportdesign/qa/unit/ReportDesignBasicTests.cxx |   13 ++++---------
 reportdesign/qa/unit/ReportDesignTest_base.cxx  |    7 ++++---
 reportdesign/qa/unit/data/roundTrip.odb         |binary
 4 files changed, 13 insertions(+), 19 deletions(-)

New commits:
commit 0bad0e6d4be04802c7e7c8db986a7fe05c161876
Author:     Adam Seskunas <[email protected]>
AuthorDate: Thu Aug 21 07:25:21 2025 -0700
Commit:     Xisco Fauli <[email protected]>
CommitDate: Thu Sep 4 11:12:39 2025 +0200

    Use createTempCopy in ReportDesignBasicTests
    
    The original test in ReportDesignBasicTests was
    modifying the test file, so load the test file
    as a temp copy.
    For now it only works on Linux
    
    This commit reverts
    commit b37b2cd0d29164eb5769687a999d12252420f79e
    Author: Noel Grandin <[email protected]>
    Date:   Fri Aug 29 09:38:23 2025 +0200
    
        Disable reportdesign test
    
    Change-Id: Iebe1c014794efe852e1cf9bcac7da6d3af58285c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190002
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/reportdesign/Module_reportdesign.mk 
b/reportdesign/Module_reportdesign.mk
index 60e87164acce..f9f2775837d0 100644
--- a/reportdesign/Module_reportdesign.mk
+++ b/reportdesign/Module_reportdesign.mk
@@ -24,12 +24,10 @@ $(eval $(call 
gb_Module_add_screenshot_targets,reportdesign,\
     CppunitTest_reportdesign_dialogs_test \
 ))
 
-# Disable this until it is fixed, right now it keeps modifying
-# an in-tree file.
-#ifeq ($(ENABLE_JAVA),TRUE)
-#$(eval $(call gb_Module_add_check_targets,reportdesign,\
-#    CppunitTest_reportdesign_basic_test \
-#))
-#endif
+ifeq ($(ENABLE_JAVA),TRUE)
+$(eval $(call gb_Module_add_check_targets,reportdesign,\
+    CppunitTest_reportdesign_basic_test \
+))
+endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/reportdesign/qa/unit/ReportDesignBasicTests.cxx 
b/reportdesign/qa/unit/ReportDesignBasicTests.cxx
index 5d71b0ac1153..5ba7a990b0db 100644
--- a/reportdesign/qa/unit/ReportDesignBasicTests.cxx
+++ b/reportdesign/qa/unit/ReportDesignBasicTests.cxx
@@ -28,22 +28,18 @@ using namespace ::com::sun::star::uno;
 class RptBasicTest : public ReportDesignTestBase
 {
 public:
-    void roundTripTest();
     void testLoadingAndSaving(const OUString& rFilterName, const OUString& 
rReportName,
                               Reference<frame::XComponentLoader>& 
xComponentLoader,
                               Reference<XConnection>& xActiveConnection);
-
-    CPPUNIT_TEST_SUITE(RptBasicTest);
-    CPPUNIT_TEST(roundTripTest);
-    CPPUNIT_TEST_SUITE_END();
 };
 
-void RptBasicTest::roundTripTest()
+#if !defined(MACOSX) && !defined(_WIN32) //FIXME
+CPPUNIT_TEST_FIXTURE(RptBasicTest, roundTripTest)
 {
     // Test loading and saving an already prepared Report
     // This is a very general test designed to catch crashes
     // on import and saving
-    loadURL(u"roundTrip.odb");
+    loadURLCopy(u"roundTrip.odb");
 
     Reference<frame::XModel> xModel(mxComponent, UNO_QUERY_THROW);
     Reference<frame::XController> xController(xModel->getCurrentController());
@@ -61,6 +57,7 @@ void RptBasicTest::roundTripTest()
     testLoadingAndSaving(u"writer8"_ustr, aReportNames[0], xComponentLoader, 
xActiveConnection);
     testLoadingAndSaving(u"calc8"_ustr, aReportNames[1], xComponentLoader, 
xActiveConnection);
 }
+#endif
 
 void RptBasicTest::testLoadingAndSaving(const OUString& rFilterName, const 
OUString& rReportName,
                                         Reference<frame::XComponentLoader>& 
xComponentLoader,
@@ -82,8 +79,6 @@ void RptBasicTest::testLoadingAndSaving(const OUString& 
rFilterName, const OUStr
     xCloseable->close(true);
 }
 
-CPPUNIT_TEST_SUITE_REGISTRATION(RptBasicTest);
-
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/reportdesign/qa/unit/ReportDesignTest_base.cxx 
b/reportdesign/qa/unit/ReportDesignTest_base.cxx
index 923e49525b95..bf559ef80a0b 100644
--- a/reportdesign/qa/unit/ReportDesignTest_base.cxx
+++ b/reportdesign/qa/unit/ReportDesignTest_base.cxx
@@ -31,13 +31,14 @@ public:
     ReportDesignTestBase()
         : UnoApiTest(u"reportdesign/qa/unit/data"_ustr){};
 
-    void loadURL(std::u16string_view rURL);
+    void loadURLCopy(std::u16string_view rURL);
     virtual void tearDown() override;
 };
 
-void ReportDesignTestBase::loadURL(std::u16string_view sURL)
+void ReportDesignTestBase::loadURLCopy(std::u16string_view sURL)
 {
-    mxComponent = mxDesktop->loadComponentFromURL(createFileURL(sURL), 
u"_default"_ustr, 0, {});
+    createTempCopy(sURL);
+    mxComponent = mxDesktop->loadComponentFromURL(maTempFile.GetURL(), 
u"_default"_ustr, 0, {});
 }
 
 void ReportDesignTestBase::tearDown()
diff --git a/reportdesign/qa/unit/data/roundTrip.odb 
b/reportdesign/qa/unit/data/roundTrip.odb
index a5a4f653b9d6..8ab8306646bc 100644
Binary files a/reportdesign/qa/unit/data/roundTrip.odb and 
b/reportdesign/qa/unit/data/roundTrip.odb differ

Reply via email to