summaryrefslogtreecommitdiff
path: root/indra/llcommon/tests/llerror_test.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2016-08-29 17:06:12 -0400
committerNat Goodspeed <nat@lindenlab.com>2016-08-29 17:06:12 -0400
commit6b24122857583537495a01f408c6c303f93adb02 (patch)
tree382a25e202c5fd171dcb01fb3e82bbb12781540e /indra/llcommon/tests/llerror_test.cpp
parent3d9c39c77cd4e4e8da8abf9234f1c751762985e6 (diff)
parent20cf275d21c0dce569bb3a16393b529c5c9f1c6c (diff)
Automated merge with ssh://bitbucket.org/lindenlab/viewer-vlc
Diffstat (limited to 'indra/llcommon/tests/llerror_test.cpp')
-rw-r--r--indra/llcommon/tests/llerror_test.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/indra/llcommon/tests/llerror_test.cpp b/indra/llcommon/tests/llerror_test.cpp
index f51279e817..8bace8ac41 100644
--- a/indra/llcommon/tests/llerror_test.cpp
+++ b/indra/llcommon/tests/llerror_test.cpp
@@ -237,8 +237,21 @@ namespace tut
void ErrorTestObject::test<4>()
// file abbreviation
{
- std::string thisFile = __FILE__;
- std::string abbreviateFile = LLError::abbreviateFile(thisFile);
+ std::string prev, abbreviateFile = __FILE__;
+ do
+ {
+ prev = abbreviateFile;
+ abbreviateFile = LLError::abbreviateFile(abbreviateFile);
+ // __FILE__ is assumed to end with
+ // indra/llcommon/tests/llerror_test.cpp. This test used to call
+ // abbreviateFile() exactly once, then check below whether it
+ // still contained the string 'indra'. That fails if the FIRST
+ // part of the pathname also contains indra! Certain developer
+ // machine images put local directory trees under
+ // /ngi-persist/indra, which is where we observe the problem. So
+ // now, keep calling abbreviateFile() until it returns its
+ // argument unchanged, THEN check.
+ } while (abbreviateFile != prev);
ensure_ends_with("file name abbreviation",
abbreviateFile,