summaryrefslogtreecommitdiff
path: root/indra/llmessage
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2019-02-28 16:37:47 -0800
committerRider Linden <rider@lindenlab.com>2019-02-28 16:37:47 -0800
commite1a76999c3e8aad337d765fcd6eb50c8191409ea (patch)
treebc671ff3f6da473df49f2b834e94ee6150157256 /indra/llmessage
parentd7ad30a2d4dfd83f93b0150464214f2df776eb9c (diff)
parent03db2ddc9c27cf842c6185826617b0da0d2b87f5 (diff)
Merge
Diffstat (limited to 'indra/llmessage')
-rw-r--r--indra/llmessage/tests/commtest.h8
-rw-r--r--indra/llmessage/tests/llhttpclient_test.cpp9
2 files changed, 7 insertions, 10 deletions
diff --git a/indra/llmessage/tests/commtest.h b/indra/llmessage/tests/commtest.h
index 7c8f27bbd2..0359eba803 100644
--- a/indra/llmessage/tests/commtest.h
+++ b/indra/llmessage/tests/commtest.h
@@ -34,6 +34,7 @@
#include "llsd.h"
#include "llhost.h"
#include "llexception.h"
+#include "llstring.h"
#include "stringize.h"
#include <map>
#include <string>
@@ -46,12 +47,7 @@ struct CommtestError: public LLException
static bool query_verbose()
{
- const char* cbose = getenv("INTEGRATION_TEST_VERBOSE");
- if (! cbose)
- {
- cbose = "1";
- }
- std::string strbose(cbose);
+ std::string strbose(LLStringUtil::getenv("INTEGRATION_TEST_VERBOSE", "1"));
return (! (strbose == "0" || strbose == "off" ||
strbose == "false" || strbose == "quiet"));
}
diff --git a/indra/llmessage/tests/llhttpclient_test.cpp b/indra/llmessage/tests/llhttpclient_test.cpp
index 9356a14f1f..78faa66a0d 100644
--- a/indra/llmessage/tests/llhttpclient_test.cpp
+++ b/indra/llmessage/tests/llhttpclient_test.cpp
@@ -41,6 +41,7 @@
#include "llpumpio.h"
#include "lliosocket.h"
+#include "llstring.h"
#include "stringize.h"
#include "llcleanup.h"
@@ -50,13 +51,13 @@ namespace tut
{
public:
HTTPClientTestData():
- PORT(getenv("PORT")),
+ PORT(LLStringUtil::getenv("PORT")),
// Turning NULL PORT into empty string doesn't make things work;
// that's just to keep this initializer from blowing up. We test
// PORT separately in the constructor body.
- local_server(STRINGIZE("http://127.0.0.1:" << (PORT? PORT : "") << "/"))
+ local_server(STRINGIZE("http://127.0.0.1:" << PORT << "/"))
{
- ensure("Set environment variable PORT to local test server port", PORT);
+ ensure("Set environment variable PORT to local test server port", !PORT.empty());
apr_pool_create(&mPool, NULL);
LLCurl::initClass(false);
mClientPump = new LLPumpIO(mPool);
@@ -87,7 +88,7 @@ namespace tut
}
}
- const char* const PORT;
+ const std::string PORT;
const std::string local_server;
private: