Skip to content

Testing

Matt Butrovich edited this page Aug 15, 2018 · 5 revisions

Build and Run ALL Unit Test Cases

Terrier uses AddressSanitizer to detect memory errors including leaks. It's faster and more lightweight to execute than Valgrind, and is enabled on our Continuous Integration environment. If you are planning to contribute to Terrier, it is highly recommended to enable AddressSanitizer locally.

To build and run all tests:

cmake -DCMAKE_BUILD_TYPE=Debug -DTERRIER_USE_ASAN=ON ..
make -j4 unittest

If you are on macOS, you may need to disable container overflow checks due to false positives like so:

ASAN_OPTIONS=detect_container_overflow=0 make -j4 unittest

The above commands perform parallel build and test. You can control the degree of parallelism by changing the value of the -j parameter with the number of cores you have.

Build and Run INDIVIDUAL Unit Test Case

Here's the command to build an individual test:

make $TEST_NAME

EXAMPLE:

make mvcc_test
You can’t perform that action at this time.