Commits

nat_linden committed 50392fa Draft

MAINT-1986: in TeamCity, do not reload saved hashmap_test data.
Rev b7fd7c95c571 allows a developer to debug a failure in hashmap_test 1. Once
the test fails, rerunning that test will replay the same failure to try to
permit debugging it. But that behavior is extremely undesirable under
TeamCity! In a TeamCity run, don't even check for saved data file.

Comments (0)

Files changed (1)

indra/test/lluuidhashmap_tut.cpp

 		std::string savefile(gDirUtilp->add(tempdir, "lluuidhashmap_tut.save.txt"));
 		const int numElementsToCheck = 32*256*32;
 		std::vector<LLUUID> idList;
-		if (gDirUtilp->fileExists(savefile))
+		if ((! getenv("TEAMCITY_PROJECT_NAME")) && gDirUtilp->fileExists(savefile))
 		{
-			// We have saved data from a previous failed run. Reload that data.
+			// This is not a TeamCity build, and we have saved data from a
+			// previous failed run. Reload that data.
 			std::ifstream inf(savefile.c_str());
 			if (! inf.is_open())
 			{
 		}
 		else
 		{
-			// savefile does not exist (normal case): regenerate idList from
-			// scratch.
+			// This is a TeamCity build, or (normal case) savefile does not
+			// exist: regenerate idList from scratch.
 			for (int i = 0; i < numElementsToCheck; ++i)
 			{
 				LLUUID id;