summaryrefslogtreecommitdiff
path: root/indra/test
AgeCommit message (Collapse)Author
2013-04-04Renaming HTTP_HEADER_* into HTTP_IN_HEADER_* and HTTP_OUT_HEADER_* to make ↵Don Kjer
it more clear which header strings should be used for incoming vs outgoing situations. Using constants for commonly used llhttpnode context strings.
2013-03-29Update Mac and Windows breakpad builds to latestGraham Madarasz
2013-03-13Merging LLCURL::Responder changes with CHUI changes. Fixed gcc 4.6 compile ↵Don Kjer
failures
2013-03-13Large changes to the LLCurl::Responder API, as well as pulling in some ↵Don Kjer
changes to common libraries from the server codebase: * Additional error checking in http handlers. * Uniform log spam for http errors. * Switch to using constants for http heads and status codes. * Fixed bugs in incorrectly checking if parsing LLSD xml resulted in an error. * Reduced spam regarding LLSD parsing errors in the default completedRaw http handler. It should not longer be necessary to short-circuit completedRaw to avoid spam. * Ported over a few bug fixes from the server code. * Switch mode http status codes to use S32 instead of U32. * Ported LLSD::asStringRef from server code; avoids copying strings all over the place. * Ported server change to LLSD::asBinary; this always returns a reference now instead of copying the entire binary blob. * Ported server pretty notation format (and pretty binary format) to llsd serialization. * The new LLCurl::Responder API no longer has two error handlers to choose from. Overriding the following methods have been deprecated: ** error - use httpFailure ** errorWithContent - use httpFailure ** result - use httpSuccess ** completed - use httpCompleted ** completedHeader - no longer necessary; call getResponseHeaders() from a completion method to obtain these headers. * In order to 'catch' a completed http request, override one of these methods: ** httpSuccess - Called for any 2xx status code. ** httpFailure - Called for any non-2xx status code. ** httpComplete - Called for all status codes. Default implementation is to call either httpSuccess or httpFailure. * It is recommended to keep these methods protected/private in order to avoid triggering of these methods without using a 'push' method (see below). * Uniform error handling should followed whenever possible by calling a variant of this during httpFailure: ** llwarns << dumpResponse() << llendl; * Be sure to include LOG_CLASS(your_class_name) in your class in order for the log entry to give more context. * In order to 'push' a result into the responder, you should no longer call error, errorWithContent, result, or completed. * Nor should you directly call httpSuccess/Failure/Completed (unless passing a message up to a parent class). * Instead, you can set the internal content of a responder and trigger a corresponding method using the following methods: ** successResult - Sets results and calls httpSuccess ** failureResult - Sets results and calls httpFailure ** completedResult - Sets results and calls httpCompleted * To obtain information about a the response from a reponder method, use the following getters: ** getStatus - HTTP status code ** getReason - Reason string ** getContent - Content (Parsed body LLSD) ** getResponseHeaders - Response Headers (LLSD map) ** getHTTPMethod - HTTP method of the request ** getURL - URL of the request * It is still possible to override completeRaw if you want to manipulate data directly out of LLPumpIO. * See indra/llmessage/llcurl.h for more information.
2013-03-12Mods to make compile on gcc 4.6.3 work mo bettaGraham Madarasz
2013-03-11llinventory merge fixesprep
2013-02-12merge up to 3.4.5-releaseOz Linden
2013-01-31disable timing sensitive check in the pipe and pump fitness testOz Linden
2013-01-24merging in viewer-beta.Nyx Linden
Most of the merge was clean, a couple conflicts. Brought over a couple patches manually for llpolymesh.
2013-01-08SH-3468 WIP add memory tracking base classRichard Linden
cleaned up hacks used to get unit tests working LLTrace::init now supports recursive initialization/cleanup put NOMINMAX back in win32 header wrappers
2013-01-08merge changes for DRTVWR-250Oz Linden
2013-01-08SH-3468 WIP add memory tracking base classRichard Linden
more fixes for unit test crashes added llcommon initialization/teardown for unit tests that indirectly trigger lltrace changed access of atomic refcount to use preincrement/decrement operators to reflect desired semantics always call apr_initialize in LLCommon::initClass, even if already initialized...apr does internal reference counting to keep things straight
2013-01-06SH-3468 WIP add memory tracking base classRichard Linden
fix for unit test failures...cleanup apr without destroying pools, allowing LLProxy to clean itself up as a singleton (and avoiding spurious dependencies associated with manually destorying singletons that rely on apr pools)
2013-01-04Automated merge with http://bitbucket.org/lindenlab/viewer-developmentRichard Linden
2012-12-19MAINT-1986: in TeamCity, do not reload saved hashmap_test data.Nat Goodspeed
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.
2012-12-04Pull and merge viewer-developmentsimon@Simon-PC.lindenlab.com
2012-11-28SH-3563. Pull and merge from viewer-development. Modest code changes to fix ↵prep
alignment issue in llAppearance.
2012-11-19merge with viewer-developmentRichard Linden
2012-11-15SH-3406 WIP convert fast timers to lltrace systemRichard Linden
eliminated min and max macros from windows.h got rest of viewer to compile against llfasttimer changes
2013-02-13disable tests that fail too often on WindowsOz Linden
2013-01-31disable timing sensitive check in the pipe and pump fitness testOz Linden
2012-10-11Updating linux build to gcc4.6Don Kjer
2012-10-10On lluuidhashmap_tut<1> failure, save/reload data in temp file.Nat Goodspeed
Generating new random data on every test run makes it impossible to debug a test failure. While in general we do want to generate random data to thoroughly exercise the generator logic, if every new run generates new data, the only thing we can do about an observed failure is shrug and ignore it. Add logic to save data on failure, with corresponding logic to notice and reload from a previously-generated save file. In case of a merge collision, this version SUPERCEDES my previous efforts with this file. (My other changes may still be in a backed-up merge request.) It is okay to resolve collisions in favor of this version.
2012-09-26SH-3275 WIP Run viewer metrics for object update messagesRichard Linden
fixed various issues related to unit tests and LLThreadLocalPtr initialization and teardown
2012-09-20Partial rewrite of llifstream and llofstream (Windows implementation ↵Don Kjer
pending). Moved more functionality from llviewerwearable to llwearable
2012-08-01Merge back viewer-lion, which has viewer-development and down-stream fixessimon@Simon-PC.lindenlab.com
2012-07-20MAINT-570 Remove unused memory tracking system LLMemTypeDave Parks
2012-06-26integrate Nats improvements to test logging with mineOz Linden
2012-06-25merge up to 3.3.3-release + pathfindingOz Linden
2012-06-24Add logging during tests (debug level, to test-specific files)Oz Linden
2012-06-08merge 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.