summaryrefslogtreecommitdiff
path: root/indra/llcommon/tests/llleap_test.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2018-12-14 15:38:13 -0500
committerNat Goodspeed <nat@lindenlab.com>2018-12-14 15:38:13 -0500
commitc4096f670c7b3d43f8a5c1f65ef7e02033b0329d (patch)
tree29f3f8cae0dc5bfc983a25ec6e4e9afb245d4925 /indra/llcommon/tests/llleap_test.cpp
parent132e708fec50fd756b822925313456c70a4ff27f (diff)
SL-10153: Review and rationalize fetching paths from environment.
Use LLStringUtil::getenv() or getoptenv() whenever we fetch a string that will be used as a pathname. Use LLFile::tmpdir() instead of getenv("TEMP"). As an added extra-special bonus, finally clean up $TMP/llcontrol-test-zzzzzz directories that have been accumulating every time we run a local build!
Diffstat (limited to 'indra/llcommon/tests/llleap_test.cpp')
-rw-r--r--indra/llcommon/tests/llleap_test.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/indra/llcommon/tests/llleap_test.cpp b/indra/llcommon/tests/llleap_test.cpp
index c387da6c48..45648536c4 100644
--- a/indra/llcommon/tests/llleap_test.cpp
+++ b/indra/llcommon/tests/llleap_test.cpp
@@ -26,6 +26,7 @@
#include "wrapllerrs.h"
#include "llevents.h"
#include "llprocess.h"
+#include "llstring.h"
#include "stringize.h"
#include "StringVec.h"
#include <functional>
@@ -198,14 +199,12 @@ namespace tut
// basename.
reader_module(LLProcess::basename(
reader.getName().substr(0, reader.getName().length()-3))),
- pPYTHON(getenv("PYTHON")),
- PYTHON(pPYTHON? pPYTHON : "")
+ PYTHON(LLStringUtil::getenv("PYTHON"))
{
- ensure("Set PYTHON to interpreter pathname", pPYTHON);
+ ensure("Set PYTHON to interpreter pathname", !PYTHON.empty());
}
NamedExtTempFile reader;
const std::string reader_module;
- const char* pPYTHON;
const std::string PYTHON;
};
typedef test_group<llleap_data> llleap_group;