diff options
author | Luboš Luňák <l.lunak@centrum.cz> | 2022-02-28 04:02:14 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2022-03-15 21:12:47 +0100 |
commit | c0361119dfb5a1accfae9f777844e22846af8ecc (patch) | |
tree | 59070916dfa8c61f45e0961c548ca640e92418bf /sal | |
parent | 1f7703febb182a0542522b3403740d526c575abd (diff) |
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 <l.lunak@collabora.com>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/cppunittester/cppunittester.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
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"); |