summaryrefslogtreecommitdiff
path: root/indra/test
AgeCommit message (Collapse)Author
2012-06-07merge changes for DRTVWR-162Oz Linden
2012-06-06Automated merge with file:///Users/nat/linden/viewer-maint-1144Nat Goodspeed
2012-06-06MAINT-1144: Break out llhttpclient_tut as standalone integration test.Nat Goodspeed
indra/test/llhttpclient_tut.cpp ==> indra/llmessage/tests/llhttpclient_test.cpp, with corresponding CMakeLists.txt changes in their respective directories. This first commit merely moves the test source file without changing it -- separating out moves from edits simplifies code review.
2012-06-06MAINT-1144: Unblock build for previous commit.Nat Goodspeed
Today, 2012-06-06, LLHTTPClient::get("http://www.google.com/") has stopped working. This is unrelated to viewer code changes: it crosses repo boundaries. Skip the afflicted tests to get builds working until we can recast the tests to avoid the flaky dependency.
2012-05-09CHOP-900: Fix test.cpp merge errors merging up to viewer-releaseNat Goodspeed
2012-05-09Automated merge with http://hg.secondlife.com/viewer-releaseNat Goodspeed
2012-04-23IQA-463: LLError::addRecorder() claims ownership of passed Recorder*.Nat Goodspeed
That is, when the underlying LLError::Settings object is destroyed -- possibly at termination, possibly on LLError::restoreSettings() -- the passed Recorder* is deleted. There was much existing code that seemed as unaware of this alarming fact as I was myself. Passing to addRecorder() a pointer to a stack object, or to a member of some other object, is just Bad. It might be preferable to make addRecorder() accept std::auto_ptr<Recorder> to make the ownership transfer more explicit -- or even boost::shared_ptr<Recorder> instead, which would allow the caller to either forget or retain the passed Recorder. This preliminary pass retains the Recorder* dumb pointer API, but documents the ownership issue, and eliminates known instances of passing pointers to anything but a standalone heap Recorder subclass object.
2012-03-05Make test.cpp support LOGFAIL env var: only failed tests show log.Nat Goodspeed
Set LOGFAIL= one of ALL, DEBUG, INFO, WARN, ERROR, NONE. A passing test will run silently, as now; but a failing test will replay log output at the specified level or higher. While at it, support LOGTEST environment variable, same values. This is like setting --debug (or -d), but allows specifying an arbitrary level -- and, unlike --debug, can be set for a TeamCity build config without modifying any scripts or code. Publish LLError::decodeLevel(std::string), previously private to llerror.cpp.
2012-03-01Add NamedExtTempFile to invent arbitrary name with specified ext.Nat Goodspeed
This arises, for instance, if you want to be able to create a temporary Python module you can import from test scripts. The Python module file MUST have the .py extension.
2012-02-24Update llevents_tut.cpp to use StringVec, not local StringList.Nat Goodspeed
2012-02-15Fix llprocess_test.cpp's exception catching for Linux.Nat Goodspeed
In the course of re-enabling the indra/test tests last year, Log generalized a workaround I'd introduced in llsdmessage_test.cpp. In Linux viewer land, a test program trying to catch an expected exception can't seem to catch it by its specific class (across the libllcommon.so boundary), but must instead catch std::runtime_error and validate the typeid().name() string. Log added a macro for this idiom in llevents_tut.cpp. Generalize that macro further for normal-case processing as well, move it to a header file of its own and use it in all known places -- plus the new exception-catching tests in llprocess_test.cpp.
2012-02-08Echo group_started, group_completed to test-program output file.Nat Goodspeed
This isn't recent oversight; in viewer-development the output file never contained those lines either. But it should. Using scoped_ptr is more robust than using a dumb pointer with inline "Oh yeah, don't forget to clean up that pointer" logic.
2012-02-07Automated merge with file:C%3A%5CUsers%5CNat%5Clinden%5Cviewer-tut-fixNat Goodspeed
2012-02-07Disable MSVC warning C4702 (unreachable code) in Boost headers.Nat Goodspeed
2012-02-06ManageAPR should be noncopyable. Make that explicit.Nat Goodspeed
Any RAII class should either be noncopyable or should deal appropriately with a copy operation. ManageAPR is intended only for extremely simple cases, and hence should be noncopyable.
2012-02-03Automated merge with file:///Users/nat/linden/viewer-tut-fixNat Goodspeed
2012-02-03Escape all strings embedded in TeamCity service messages.Nat Goodspeed
TeamCity requires that certain characters (notably "'") must be escaped when embedded in service messages: http://confluence.jetbrains.net/display/TCD65/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ServiceMessages TUT frequently outputs messages containing "'", e.g. from ensure_equals() failure. We've seen TC output nesting get confused when it fails to process service messages properly due to parsing unescaped messages. Along with test<n> number, report test name (from set_test_name()) when available. Eliminate horsing around to produce normal output on both std::cout and possible output file. When output file is specified, use boost::iostreams::tee_device to do fanout for us. Improve placement (and possibly reliability) of service messages. Clean up a startling amount of redundancy in service-message production.
2012-01-17Any proper RAII class must either handle copying or be noncopyable.Nat Goodspeed
NamedTempFile makes no attempt to deal with copying, therefore make it noncopyable.
2012-01-17Make NamedTempFile::peep() a public member for debugging unit tests.Nat Goodspeed
2012-01-13Extract APR and temp-fixture-file helper code to indra/test.Nat Goodspeed
Specifically: Introduce ManageAPR class in indra/test/manageapr.h. This is useful for a simple test program without lots of static constructors. Extract NamedTempFile from llsdserialize_test.cpp to indra/test/ namedtempfile.h. Refactor to use APR file operations rather than platform- dependent APIs. Use NamedTempFile for llprocesslauncher_test.cpp.
2011-12-01Automated merge with http://hg.secondlife.com/viewer-developmentNat Goodspeed
2011-12-01LLSD-14: Move LLSD::(outstanding|allocation)Count() to free functions.Nat Goodspeed
Free functions can be unconditionally compiled into the .o file, but conditionally hidden in the header file. Static class methods don't have that flexibility: without a declaration in the header file, you can't compile a function definition in the .cpp file. That makes it awkward to use the same llcommon build for production and for unit tests. Why make the function declarations conditional at all? These are debugging functions. They break the abstraction, they peek under the covers. Production code should not use them. Making them conditional on an #ifdef symbol in the unit-test source file means the compiler would reject any use by production code. Put differently, it allows us to assert with confidence that only unit tests do use them. Put new free functions in (lowercase) llsd namespace so as not to clutter global namespace. Tweak the one known consumer (llsd_new_tut.cpp) accordingly.
2011-11-18Re-added some missing calls to apr_pool_destroy() that I failed to readd ↵Logan Dethrow
after the thread local storage rollback. Also added a call to LLProxy::cleanupClass() to prevent indra/test from segfaulting on exit.
2011-11-17LLSD-14: Add tests from Simon's server-trunk changeset 3852648182db.Nat Goodspeed
That changeset provides most of the changes previously checked in on this Jira (viewer changeset 22b293aae639). Bring over the code he added to llsd_new_tut.cpp as well.
2011-11-17LLSD-14: Bring over llsd.{h,cpp} enhancements from server-trunk.Nat Goodspeed
Because new enum values have been added to the LLSD type field, a few external switch statements must be adjusted to suppress fatal warnings, even though we never expect to encounter an LLSD instance containing any of the new values.
2011-10-20Fixed test build issues caused by merging. Still encountering pthread assert ↵Logan Dethrow
after running indra/test
2011-10-19Merged with viewer-development.Logan Dethrow
2011-10-12Removed one ugly const_cast, the other one is needed for the time being.Logan Dethrow
2011-10-05Changed the handling of the different naming of fpclassify on windows and ↵Logan Dethrow
Linux in llsd_new_tut.cpp to be more clean at Nat's recommendation.
2011-09-16Removed the bool version of the linux exception catching macro in ↵Logan Dethrow
llevents_tut.cpp.
2011-09-16Fixed linux exception catching macros in llevents_tut.cpp. All tests now ↵Logan Dethrow
pass on a lenny build machine.
2011-09-15Changed extra linux exception handling into a pair of macros.Logan Dethrow
2011-09-15Added extra exception catching code to llevents_tut.cpp to fix linux test ↵Logan Dethrow
failures.
2011-09-15Fixed CMakeLists.txt line ending.Logan Dethrow
2011-09-15Backed out changeset 19aa1a773410Logan Dethrow
2011-09-14Copied newer version of llevents_tut from server. Fixed line ending in ↵Logan Dethrow
CMakeLists.txt.
2011-09-13Always build indra/test, run if LL_TESTS is enabled. Removed python test run ↵Logan Dethrow
command since there are no python tests in the viewer.
2011-09-09Re-enabled llapp_tut.cpp test for testing. Copied llapp_tut.cpp from server ↵Logan Dethrow
directory. The commented line indicates threading breakage in the LLApp test, but I have not seen evidence of this so far while testing on linux.
2011-09-09Re-enabled and fixed llsd_new_tut.cpp by copying the fixed version from the ↵Logan Dethrow
server test directory.
2011-09-09Fixed llhttpclient_tut.cpp by initializing the LLCurl class during test setup.Logan Dethrow
2011-09-09Removed some spurious newlines that I introduced into CMakeLists.txt.Logan Dethrow
2011-09-09Fixed indra test dynamic library issues.Logan Dethrow
2011-06-29Got indra/test to build. Fails to run due to missing .so files.Logan Dethrow
2011-02-23MergeXiaohong Bao
2011-02-09STORM-937 : Fix python scripts shebang line and license header for consistencyMerov Linden
2011-02-05Introduces a LLThreadLocalData class that can beAleric Inglewood
accessed through the static LLThread::tldata(). Currently this object contains two (public) thread-local objects: a LLAPRRootPool and a LLVolatileAPRPool. The first is the general memory pool used by this thread (and this thread alone), while the second is intended for short lived memory allocations (needed for APR). The advantages of not mixing those two is that the latter is used most frequently, and as a result of it's nature can be destroyed and reconstructed on a "regular" basis. This patch adds LLAPRPool (completely replacing the old one), which is a wrapper around apr_pool_t* and has complete thread-safity checking. Whenever an apr call requires memory for some resource, a memory pool in the form of an LLAPRPool object can be created with the same life-time as this resource; assuring clean up of the memory no sooner, but also not much later than the life-time of the resource that needs the memory. Many, many function calls and constructors had the pool parameter simply removed (it is no longer the concern of the developer, if you don't write code that actually does an libapr call then you are no longer bothered with memory pools at all). However, I kept the notion of short-lived and long-lived allocations alive (see my remark in the jira here: https://jira.secondlife.com/browse/STORM-864?focusedCommentId=235356&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-235356 which requires that the LLAPRFile API needs to allow the user to specify how long they think a file will stay open. By choosing 'short_lived' as default for the constructor that immediately opens a file, the number of instances where this needs to be specified is drastically reduced however (obviously, any automatic LLAPRFile is short lived). *** Addressed Boroondas remarks in https://codereview.secondlife.com/r/99/ regarding (doxygen) comments. This patch effectively only changes comments. Includes some 'merge' stuff that ended up in llvocache.cpp (while starting as a bug fix, now only resulting in a cleanup). *** Added comment 'The use of apr_pool_t is OK here'. Added this comment on every line where apr_pool_t is correctly being used. This should make it easier to spot (future) errors where someone started to use apr_pool_t; you can just grep all sources for 'apr_pool_t' and immediately see where it's being used while LLAPRPool should have been used. Note that merging this patch is very easy: If there are no other uses of apr_pool_t in the code (one grep) and it compiles, then it will work. *** Second Merge (needed to remove 'delete mCreationMutex' from LLImageDecodeThread::~LLImageDecodeThread). *** Added back #include <apr_pools.h>. Apparently that is needed on libapr version 1.2.8., the version used by Linden Lab, for calls to apr_queue_*. This is a bug in libapr (we also include <apr_queue.h>, that is fixed in (at least) 1.3.7. Note that 1.2.8 is VERY old. Even 1.3.x is old. *** License fixes (GPL -> LGPL). And typo in comments. Addresses merov's comments on the review board. *** Added Merov's compile fixes for windows.
2010-12-16VWR-24251: Fix -DLL_TESTS:BOOL=ON on standalone when Tut is installed in a ↵Aleric Inglewood
non-standard directory. If tut/tut.hpp isn't installed in a standard include directory all tests fail because the found include directory for tut isn't passed to the compiler. This patch fixes this by passing it. Note that using include_directories() in a Find*.cmake file is bad practise. The correct way is to set an include dir variable and call include_directories() once. It certainly doesn't work for the tests anyway because the tests are all over the place and include_directories is on a per folder basis. What is needed is to set it for each (test) target. However, there is no TARGET_INCLUDE_DIRECTORIES. The closest thing that we have is to set the COMPILE_FLAGS property for a target. Fortunately, standalone is only used for linux, so we can just use -I${TUT_INCLUDE_DIR} to get the effect we want.
2010-08-25forcing all the teamcity service messages to be spat out at once per suite ↵Aaron Terrell (Enus)
to avoid incorrect TC reporting
2010-08-24seems that build out put sometimes concatenates and we miss a line in our ↵Aaron Terrell (Enus)
reporting parse, adding newlines at the beginning of each case out
2010-08-24commenting out object delete as windows builds are complaining: '[LogScan] ↵Aaron Terrell (Enus)
e:\w-enus_viewer-tut-teamcity\latest\indra\test\test.cpp(466) : error C2220: warning treated as error - no 'object' file generated [LogScan] e:\w-enus_viewer-tut-teamcity\latest\indra\test\test.cpp(466) : warning C4702: unreachable code'