Skip to content
Avi Kivity edited this page Feb 16, 2015 · 1 revision

Testing

To run all tests:

$ ./test.py
[8/8] PASSED tests/memcached/test.py --mode release
OK.

The above will include all tests, even the ones which take some time to run. However most of the tests are fast and the fast tests cover almost all functionality. So there is a quicker version intended to be used more frequently which skips slow tests, just pass --fast flag to test.py:

$ time ./test.py --fast
[8/8] PASSED tests/memcached/test.py --mode release --fast   
OK.

real	0m1.349s
user	0m0.651s
sys	0m0.260s

Adding tests

Tests are currently white-listed inside test.py. To add a new test, append it the this list:

all_tests = [
    'futures_test',
    'memcached/test_ascii_parser',
    'sstring_test',
]

The list contains paths relative to build/release/tests and build/debug/tests.