Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Most of the merge was clean, a couple conflicts.
Brought over a couple patches manually for llpolymesh.
|
|
|
|
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.
|
|
|
|
alignment issue in llAppearance.
|
|
|
|
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.
|
|
pending). Moved more functionality from llviewerwearable to llwearable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|
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.
|
|
NamedTempFile makes no attempt to deal with copying, therefore make it
noncopyable.
|
|
|
|
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.
|
|
|
|
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.
|
|
after the thread local storage rollback. Also added a call to LLProxy::cleanupClass() to prevent indra/test from segfaulting on exit.
|
|
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.
|
|
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.
|
|
after running indra/test
|
|
|
|
|
|
Linux in llsd_new_tut.cpp to be more clean at Nat's recommendation.
|
|
llevents_tut.cpp.
|