From c0b1d1bf5701d5f94b618f70da8e863d32d97ab4 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 14 Oct 2014 23:32:05 +0200 Subject: cppunittester: make tracking down temp file leaks easier Temp files created before first test method don't see LO_TESTNAME Change-Id: Iff74abf574f5151980f463646f11c1b32ad0c241 --- sal/cppunittester/cppunittester.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx index 51bc5c68a06e..148eed0e1b51 100644 --- a/sal/cppunittester/cppunittester.cxx +++ b/sal/cppunittester/cppunittester.cxx @@ -237,6 +237,9 @@ public: #ifdef UNX EyecatcherListener eye; result.addListener(&eye); + // set this to track down files created before first test method + std::string lib(testlib.substr(testlib.rfind('/')+1)); + setenv("LO_TESTNAME", lib.c_str(), true); #endif CppUnit::TestRunner runner; -- cgit