User Tools

Site Tools


for_developers:testing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
for_developers:testing [2021/05/25 14:09] – [Suppress Logger Output] ursgraffor_developers:testing [2025/06/04 16:03] (current) – [Suppress Logger Output] ursgraf
Line 1: Line 1:
 ====== Testing ====== ====== Testing ======
-We use [[https://github.com/google/googletest|Google Test]] as our test framework. Read [[https://github.com/google/googletest/blob/master/googletest/docs/primer.md]] to understand how to use the available macros for defining test cases. +We use [[https://google.github.io/googletest/|Google Test]] as our test framework. Read [[https://google.github.io/googletest/primer.html]] to understand how to use the available macros for defining test cases. 
  
 ===== Naming ===== ===== Naming =====
Line 20: Line 20:
 $ ./unitTests  --gtest_filter=mathMatrix*     // run all the tests in math/Matrix $ ./unitTests  --gtest_filter=mathMatrix*     // run all the tests in math/Matrix
 $ ./unitTests  --gtest_filter=-hal*           // run all the tests without hal $ ./unitTests  --gtest_filter=-hal*           // run all the tests without hal
 +$ ./unitTests  --gtest_filter=-hal*:saf*      // run all the tests without hal and without safety
 $ ./unitTests  -l sim --gtest_filter=hal*     // run all the tests in hal using the simulator $ ./unitTests  -l sim --gtest_filter=hal*     // run all the tests in hal using the simulator
 </code> </code>
  
-For the test with the HAL you need to install the [[getting_started:install_wrapper#simulator|]] and set the library path (see [[getting_started:deploy|]]) so that the simulator library can be found.+For the test with the HAL you need to install the [[getting_started:install_wrapper#simulator|]] and set the library path (see [[getting_started:deploy|]]) so that the simulator library can be found. Some safety system tests also need the HAL.
  
 ===== Suppress Logger Output ===== ===== Suppress Logger Output =====
Line 29: Line 30:
 <code cpp> <code cpp>
 std::cout.setstate(std::ios_base::badbit); std::cout.setstate(std::ios_base::badbit);
-logger::Logger::setDefaultStreamLogger(std::cout);+eeros::logger::Logger::setDefaultStreamLogger(std::cout);
 </code> </code>
  
 +===== Running the Tests with a Script =====
 +You can find a script under ''/scripts'' which builds eeros together with the simulator and runs all the tests.
  
  
for_developers/testing.1621944574.txt.gz · Last modified: 2021/05/25 14:09 by ursgraf