Skip to content
Snippets Groups Projects
  1. Sep 07, 2018
  2. Sep 05, 2018
  3. 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
  4. Dec 20, 2016
  5. Aug 17, 2015
  6. Aug 15, 2015
  7. Aug 14, 2015
  8. Oct 21, 2014
  9. Oct 13, 2014
  10. Mar 19, 2014
  11. Jan 09, 2014
  12. Mar 27, 2013
  13. 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
  14. Dec 07, 2012
  15. Nov 21, 2012
  16. Sep 12, 2012
  17. Sep 10, 2012
  18. Sep 07, 2012
  19. Aug 02, 2012
  20. Jan 06, 2012
  21. May 06, 2011
  22. Mar 19, 2011
  23. Feb 10, 2011
  24. Jan 06, 2011
  25. 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
  26. Nov 22, 2010
  27. Nov 10, 2010
  28. Oct 11, 2010
  29. Sep 21, 2010
  30. Aug 19, 2010
  31. 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
  32. Jun 18, 2010
    • Nat Goodspeed's avatar
      Centralize LD_LIBRARY_PATH logic with new SET_TEST_PATH macro. · 477fb26c
      Nat Goodspeed authored
      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.
      477fb26c
  33. Nov 03, 2009
  34. Oct 20, 2009
  35. Oct 08, 2009
    • Adam Moss's avatar
      DEV-41080 · ac63aaf7
      Adam Moss authored
      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).
      ac63aaf7
Loading