sal/cppunittester/cppunittester.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit c0361119dfb5a1accfae9f777844e22846af8ecc
Author:     Luboš Luňák <[email protected]>
AuthorDate: Mon Feb 28 04:02:14 2022 +0100
Commit:     Luboš Luňák <[email protected]>
CommitDate: Tue Mar 15 21:12:47 2022 +0100

    set LO_TESTNAME on startup on all platforms
    
    c0b1d1bf5701d5f94b618f70da8e863d32d97ab4 did this only for UNX
    for no apparent reason. Solves CppunitTest_sc_tablecolumnsobj
    asserting on it not being set.
    
    Change-Id: Ia9484e5c90bef18450addcf9429f9a27d575c3b4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131631
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <[email protected]>

diff --git a/sal/cppunittester/cppunittester.cxx 
b/sal/cppunittester/cppunittester.cxx
index 5b886ea2189d..f75caccbc143 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -301,9 +301,12 @@ public:
 
             EyecatcherListener eye;
             result.addListener(&eye);
-#ifdef UNX
+
             // set this to track down files created before first test method
             std::string lib = testlib.substr(testlib.rfind('/')+1);
+#ifdef WIN32
+            _putenv_s("LO_TESTNAME", lib.c_str());
+#else
             setenv("LO_TESTNAME", lib.c_str(), true);
 #endif
             const char* pVal = getenv("CPPUNIT_TEST_NAME");

Reply via email to