summaryrefslogtreecommitdiff
path: root/indra/cmake/LLAddBuildTest.cmake
AgeCommit message (Collapse)Author
2022-04-13Remove obsolete and unmaintained USE_SYSTEMLIBSNicky
2022-04-06Googlemock targetNicky
2022-04-06Move CMake files to modernized cmake syntax, step 1.Nicky
Change projects to cmake targetsto get rid of havig to hardcore include directories and link libraries in consumer projects.
2020-08-24SL-10297 merged 6.4.7Oz Linden
2020-03-25[DRTVWR-476] - fix linkingAnchor
2020-03-25[DRTVWR-476] - test adding at beginiing of listAnchor
2020-03-25[DRTVWR-476] - legacy_stdio_definitions shld be the last library linkedAnchor
2020-03-25SL-793: Use Boost.Fiber instead of the "dcoroutine" library.Nat Goodspeed
Longtime fans will remember that the "dcoroutine" library is a Google Summer of Code project by Giovanni P. Deretta. He originally called it "Boost.Coroutine," and we originally added it to our 3p-boost autobuild package as such. But when the official Boost.Coroutine library came along (with a very different API), and we still needed the API of the GSoC project, we renamed the unofficial one "dcoroutine" to allow coexistence. The "dcoroutine" library had an internal low-level API more or less analogous to Boost.Context. We later introduced an implementation of that internal API based on Boost.Context, a step towards eliminating the GSoC code in favor of official, supported Boost code. However, recent versions of Boost.Context no longer support the API on which we built the shim for "dcoroutine." We started down the path of reimplementing that shim using the current Boost.Context API -- then realized that it's time to bite the bullet and replace the "dcoroutine" API with the Boost.Fiber API, which we've been itching to do for literally years now. Naturally, most of the heavy lifting is in llcoros.{h,cpp} and lleventcoro.{h,cpp} -- which is good: the LLCoros layer abstracts away most of the differences between "dcoroutine" and Boost.Fiber. The one feature Boost.Fiber does not provide is the ability to forcibly terminate some other fiber. Accordingly, disable LLCoros::kill() and LLCoprocedureManager::shutdown(). The only known shutdown() call was in LLCoprocedurePool's destructor. We also took the opportunity to remove postAndSuspend2() and its associated machinery: FutureListener2, LLErrorEvent, errorException(), errorLog(), LLCoroEventPumps. All that dual-LLEventPump stuff was introduced at a time when the Responder pattern was king, and we assumed we'd want to listen on one LLEventPump with the success handler and on another with the error handler. We have never actually used that in practice. Remove associated tests, of course. There is one other semantic difference that necessitates patching a number of tests: with "dcoroutine," fulfilling a future IMMEDIATELY resumes the waiting coroutine. With Boost.Fiber, fulfilling a future merely marks the fiber as ready to resume next time the scheduler gets around to it. To observe the test side effects, we've inserted a number of llcoro::suspend() calls -- also in the main loop. For a long time we retained a single unit test exercising the raw "dcoroutine" API. Remove that. Eliminate llcoro_get_id.{h,cpp}, which provided llcoro::get_id(), which was a hack to emulate fiber-local variables. Since Boost.Fiber has an actual API for that, remove the hack. In fact, use (new alias) LLCoros::local_ptr for LLSingleton's dependency tracking in place of llcoro::get_id(). In CMake land, replace BOOST_COROUTINE_LIBRARY with BOOST_FIBER_LIBRARY. We don't actually use the Boost.Coroutine for anything (though there exist plausible use cases).
2019-03-02convert to an explicit USE_BUGSPLAT switch in cmake, revise LL_ERRS approachOz Linden
2018-09-07remove only-partially-successful attempt to put teamcity blocks around targetsOz Linden
2018-09-05add more block structure to TeamCity log output for componentsOz Linden
2017-05-08DRTVWR-418: Fix -std=c++11 llinstancetracker_test crash.Nat Goodspeed
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.
2016-12-20don't add llcorehttp to all testsOz Linden
2015-08-17swap common and core?Rider Linden
2015-08-17Get unit tests (Integration and project) compiling and linking again.Rider Linden
2015-08-14These tests are just causing a cascade of errors..rider
2015-08-14MAINT-5506: Converted llmessage untrusted sim message responder to coroutine.Rider Linden
Removed HTTPSender, HTTPNullSender, HTTPCapSender. Moved UntrustedMessageCap storage into LLHost Added boost libraries to PROJECT_x_TEST linkage.
2014-10-21correct test construction macro target reference for integration testsOz Linden
2014-10-13fixes for cmake warnings about policy changes. could not fully test these ↵JJ Linden
changes
2014-05-07merge changes for 3.7.7-releaseOz Linden
2014-03-19OPEN-199: replace the confusing STANDALONE switch with USESYSTEMLIBSOz Linden
2014-01-09fixed unit tests being generated as Windows GUI projects instead of console ↵Richard Linden
projects
2013-03-27Rollback the boost sys lib inclusion in integ tests as it was causing dup ↵Graham Madarasz
symbols
2013-03-26Add Boost System library to all testsOz Linden
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
2013-01-14Merge in viewer-developmentsimon@Simon-PC.lindenlab.com
2013-01-08merge changes for DRTVWR-250Oz Linden
2012-12-07Removed duplicated block of code in LLAddBuildTest.cmake. Added comment to ↵Logan Dethrow
point to duplicated code. Replaced hard-coded tcmalloc link option with variable that is created in GooglePerfTools.cmake.
2012-11-20Automated merge with https://bitbucket.org/lindenlab/viewer-developmentDave Parks
2012-09-07Further attempts to erradicate TCMALLOCsimon@Simon-PC.lindenlab.com
2012-09-07DRTVWR-209 Merge of viewer-development with SH-3316 drano-http code.Monty Brandenberg
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.
2012-07-11Pull in viewer-development because it's painful. Merge with runitai's help.simon@Simon-PC.lindenlab.com
2012-08-02mergeBrad Payne (Vir Linden)
2012-08-02MAINT-515 FIX, CHOP-100 FIX - technically we are avoiding these issues ↵Brad Payne (Vir Linden)
rather than fixing them; changing llcommon to be statically linked avoids the symbol issues with llcommon.dll
2012-01-06SH-2789 WIP - fixing the LL_USE_TCMALLOC code, make tests build with the ↵Brad Payne (Vir Linden)
same tcmalloc options as the sl executable
2011-05-06Continuing work on CHOP-609 build time improvements. Fixed eroneous ↵brad kittenbrink
additional_INCLUDE_DIRS setting for unit tests.
2011-03-19merged OPEN-39: include Tut.cmake for integration tests (fixes ↵Boroondas Gupte
"bitpack_test.o: No such file or directory" on standalone)
2011-03-19OPEN-39: include Tut.cmake for integration tests (fixes "bitpack_test.o: No ↵Boroondas Gupte
such file or directory" on standalone)
2011-02-09STORM-981 : Fix Linux link issues when LL_TESTS is ONMerov Linden
2011-01-06STORM-826 (workaround): correct mixed and dos-style line endingsOz Linden
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-11-10CHOP-151 Imported patch from server-trunk to support preprocessor at unit ↵Mark Palange (Mani)
tests. Rev. by Brad
2010-10-12merged SNOW-756 / VWR-23385 / STORM-374 (fixed standalone LD_LIBRARY_PATH ↵Boroondas Gupte
for unit tests)
2010-10-12SNOW-756 / VWR-23385 FOLLOWUP fixed indentationBoroondas Gupte
2010-10-12SNOW-756 / VWR-23385 FIXED standalone LD_LIBRARY_PATH for unit testsBoroondas Gupte (patch by Aleric Inglewood)
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
2010-08-19VWR-20810 (SNOW-503) Quote EXE_STAGING_DIR to prevent it failing with some pathsAimee Linden
2010-06-18Centralize LD_LIBRARY_PATH logic with new SET_TEST_PATH macro.Nat Goodspeed
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.
2010-06-21Remove tab chars inherited with file...Nat Goodspeed
2010-06-21EXT-7926: fix broken LD_LIBRARY_PATH handling on Windows.Nat Goodspeed
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.
2009-11-03Continuing work on DEV-41724/DEV-41725 normalizing shared lib staging.brad kittenbrink
It's basically working on linux.
2009-10-20It seems that ADD_INTEGRATION_TEST tests now require GoogleMock to buildNat Goodspeed