Skip to content
Snippets Groups Projects
  1. Mar 25, 2020
    • Anchor's avatar
      [DRTVWR-476] - fix linking · b5bb0794
      Anchor authored
      b5bb0794
    • Anchor's avatar
      [DRTVWR-476] - test adding at beginiing of list · 761d9aa3
      Anchor authored
      761d9aa3
    • Anchor's avatar
    • Nat Goodspeed's avatar
      SL-793: Use Boost.Fiber instead of the "dcoroutine" library. · 66981fab
      Nat Goodspeed authored
      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).
      66981fab
  2. Sep 07, 2018
  3. Sep 05, 2018
  4. May 08, 2017
    • Nat Goodspeed's avatar
      DRTVWR-418: Fix -std=c++11 llinstancetracker_test crash. · 322c4c6b
      Nat Goodspeed authored
      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.
      322c4c6b
  5. Dec 20, 2016
  6. Aug 17, 2015
  7. Aug 15, 2015
  8. Aug 14, 2015
  9. Oct 21, 2014
  10. Oct 13, 2014
  11. Mar 19, 2014
  12. Jan 09, 2014
  13. Mar 27, 2013
  14. Mar 26, 2013
    • Oz Linden's avatar
      Add Boost System library to all tests · 4da34679
      Oz Linden authored
      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
      4da34679
  15. Dec 07, 2012
  16. Nov 21, 2012
  17. Sep 12, 2012
  18. Sep 10, 2012
  19. Sep 07, 2012
  20. Aug 02, 2012
  21. Jan 06, 2012
  22. May 06, 2011
  23. Mar 19, 2011
  24. Feb 10, 2011
  25. Jan 06, 2011
  26. Dec 16, 2010
    • Aleric Inglewood's avatar
      VWR-24251: Fix -DLL_TESTS:BOOL=ON on standalone when Tut is installed in a non-standard directory. · a9021607
      Aleric Inglewood authored
      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.
      a9021607
  27. Nov 22, 2010
  28. Nov 10, 2010
  29. Oct 11, 2010
  30. Sep 21, 2010
  31. Aug 19, 2010
  32. Jun 21, 2010
    • Nat Goodspeed's avatar
      Remove tab chars inherited with file... · edb999ab
      Nat Goodspeed authored
      edb999ab
    • Nat Goodspeed's avatar
      EXT-7926: fix broken LD_LIBRARY_PATH handling on Windows. · 4e538adc
      Nat Goodspeed authored
      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.
      4e538adc
Loading