Age | Commit message (Collapse) | Author |
|
|
|
|
|
LLInstanceTracker<T> performs validation in ~LLInstanceTracker(). Normally
validation failure logs an error and terminates the program, which is fine. In
the test executable, though, we want validation failure to throw an exception
instead so we can catch it and continue testing other failure conditions. But
since destructors in C++11 are implicitly noexcept(true), that exception never
made it out of ~LLInstanceTracker(): it crashed the test program instead.
Declaring ~LLInstanceTracker() noexcept(false) solves that, allowing the test
program to catch the exception and continue.
However, if we unconditionally declare that, then every destructor anywhere in
the inheritance hierarchy for any LLInstanceTracker subclass must also be
noexcept(false)! That's way too pervasive, especially for functionality we
only need (or want) in a specific test executable.
Instead, make the CMake macros LL_ADD_PROJECT_UNIT_TESTS() and
LL_ADD_INTEGRATION_TEST() -- with which we define all viewer build-time tests
-- define two new command-line macros: LL_TEST=testname and LL_TEST_testname.
That way, preprocessor logic in a header file can detect whether it's being
compiled for production code or for a test executable.
(While at it, encapsulate in a new GET_OPT_SOURCE_FILE_PROPERTY() CMake macro
an ugly repetitive pattern. The builtin GET_SOURCE_FILE_PROPERTY() sets the
target variable to "NOTFOUND" -- rather than an empty string -- if the
specified property wasn't set. Every call to GET_SOURCE_FILE_PROPERTY() in
LL_ADD_PROJECT_UNIT_TESTS() was followed by a test for NOTFOUND and an
assignment to "". Wrap all that in a macro whose 'unset' value is "".)
Now llinstancetracker.h can detect when we're building the LLInstanceTracker
unit test executable, and *only then* declare ~LLInstanceTracker() as
noexcept(false). We #define LLINSTANCETRACKER_DTOR_NOEXCEPT to expand either
empty or noexcept(false), also detecting clang in C++11 mode. (It all works
fine without noexcept(false) until we turn on C++11 mode.)
We also use that macro for the StatBase class in lltrace.h. Turns out some of
the infrastructure headers required for tests in general, including the
LLInstanceTracker test, use LLInstanceTracker. Fortunately that appears to be
the only other class we must annotate this way for the LLInstanceTracker tests.
|
|
|
|
|
|
|
|
|
|
Removed HTTPSender, HTTPNullSender, HTTPCapSender.
Moved UntrustedMessageCap storage into LLHost
Added boost libraries to PROJECT_x_TEST linkage.
|
|
|
|
changes
|
|
|
|
|
|
projects
|
|
symbols
|
|
I don't know what added this requirement, but this last night lots of
them started failing to link.
Also remove some obsolete commented-out stuff
|
|
|
|
|
|
point to duplicated code. Replaced hard-coded tcmalloc link option with variable that is created in GooglePerfTools.cmake.
|
|
|
|
|
|
Cmake files not merged correctly and had to be done by hand. New memory
allocation made some memory usage tests in the llcorehttp integration
tests no longer valid. Would like to work on LLLog sometime and get
it to be consistent. Special flags needed for windows build of example
program.
|
|
|
|
|
|
rather than fixing them; changing llcommon to be statically linked avoids the symbol issues with llcommon.dll
|
|
same tcmalloc options as the sl executable
|
|
additional_INCLUDE_DIRS setting for unit tests.
|
|
"bitpack_test.o: No such file or directory" on standalone)
|
|
such file or directory" on standalone)
|
|
|
|
|
|
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.
|
|
tests. Rev. by Brad
|
|
for unit tests)
|
|
|
|
Used patch from https://jira.secondlife.com/secure/attachment/41586/SNOW-756-standalone_tests.diff
patching file indra/cmake/LLAddBuildTest.cmake
Hunk #1 succeeded at 259 with fuzz 2 (offset 1 line).
Added entry in doc/contributions.txt. No further changes.
originally commited to Snowglobe 2.1 at http://svn.secondlife.com/trac/linden/changeset/3515
|
|
|
|
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.
|
|
|
|
Recent checkins introduced two different CMake macros SET_TEST_LIST (which
returned a CMake list of PATH directory strings) and SET_TEST_PATH (which
returned a single platform-appropriate PATH string). On Windows, whose
path-separator character is ';', SET_TEST_PATH interacted badly with CMake: in
CMake, a single string containing ';' characters is indistinguishable from a
list of strings.
Eliminate the return-single-string form, redirecting the name SET_TEST_PATH to
the macro that returns a CMake list. Make LL_TEST_COMMAND expect a list value,
prepending each directory string with run_build_test.py's -l switch.
|
|
It's basically working on linux.
|
|
|
|
|
|
The unit testing framework itself doesn't (shouldn't) depend upon llmath, so relax that dependancy when we're actually testing llmath itself.
This makes llmath unit-testable.
Subsequently, upgrade some of the llmath Integration tests to something much closer to Unit tests (hooray).
|
|
|
|
Because the details of RunBuildTest.cmake versus run_build_test.py had to be
changed in so many different places, introduce LL_TEST_COMMAND CMake macro (in
LLTestCommand.cmake) to encapsulate construction of the actual command line.
Use LL_TEST_COMMAND in LL_ADD_PROJECT_UNIT_TESTS, LL_ADD_INTEGRATION_TEST, the
big indra/test monolith and the various LslCompilerMacros.
Fix run_build_test.py to pass through the test executable's own options (e.g.
--touch, --output) without inspection. Defend it against the case when the
platform-specific library path environment variable doesn't yet exist. Make it
report errors only on nonzero test-program rc.
Remove RunBuildTest.cmake.
|
|
when you pass in a command string with command-line arguments,
RunBuildTest.cmake attempts to search for a program whose filename is the
entire command line. Uncommented separate_arguments().
Added SHARED_LIB_STAGING_DIR to LL_ADD_INTEGRATION_TEST LD_LIBRARY_PATH.
|
|
|
|
|
|
LL_ADD_INTEGRATION_TEST supports tests that may require linking against one or
more Linden libraries, or that should be executed with a wrapper script.
Use this to test lllazy.cpp, llsdmessage.cpp and llcapabilitylistener.cpp.
|
|
Moves libllcommon.so to a staging dir for unit tests to work
and gets rid of LL_COMMON_API in forward declarations
|