Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
|
|
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.
|
|
pass on a lenny build
machine.
|
|
|
|
failures.
|
|
|
|
|
|
CMakeLists.txt.
|
|
command since there are no python tests in the viewer.
|
|
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.
|
|
server test directory.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
to avoid incorrect TC reporting
|
|
reporting parse, adding newlines at the beginning of each case out
|
|
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'
|
|
ridding it of member variables
|
|
reporting into a clean repo
|
|
|
|
|
|
Add ${SHARED_LIB_STAGING_DIR_RELEASE} to LD_LIBRARY_PATH for executing tests:
otherwise Debug-build tests can't find (e.g.) the aprutil DLL, for which we
don't build/package a debug variant.
Leverage discovery that a CMake macro can accept a target variable name
argument for LL_TEST_COMMAND macro.
|
|
Certain tests of allowModifyBy(), allowCopyBy() and allowMoveBy() were
computing a bit-shifted S32 value and testing that the method return value
matched that specific bit. Whoever originally coded the test probably started
with allowModifyBy() == TRUE, but observed that it didn't work. Instead of
just testing for nonzero, in the spirit of BOOL, he then determined the
specific BOOL value (typedef for 'int') returned by each test so he could
still compare for equality. In other words, the tests were far too
knowledgeable about the method implementation. At some point these methods
were changed to return C++ standard 'bool' instead, so the internal
bit-masking operations got mapped to 'true' and 'false' anyway, making it
impossible for the original equality comparison to succeed. Fix tests
accordingly.
Use ensure_equals("msg", expr1, expr2) instead of ensure("msg", expr1 == expr2).
On failure, the former will report the actual mismatched values.
Remove other extraneous Microsoft-style "BOOL" usage (e.g. expr == TRUE).
|
|
|
|
|
|
|
|
Replace LLEventPump's boost::scoped_ptr<LLStandardSignal> with
boost::shared_ptr. Take a local stack copy of that shared_ptr in post()
methods, and invoke the signal through that copy. This guards against scenario
in which LLEventPump gets destroyed during signal invocation. (See Jira for
details.) Re-enable Mani's test case that used to crash.
Introduce ll_template_cast<> to allow a template function to recognize a
parameter of a particular type.
Introduce LLListenerWrapper mechanism to support wrapper objects for
LLEventPump listeners. You instantiate an LLListenerWrapper subclass object
inline in the listen() call (typically with llwrap<>), passing it the real
listener, trusting it to forward the eventual call.
Introduce prototypical LLCoutListener and LLLogListener subclasses for
illustrative and diagnostic purposes. Test that LLLogListener doesn't block
recognizing LLEventTrackable base class bound into wrapped listener.
|
|
|
|
|
|
|
|
|