aboutsummaryrefslogtreecommitdiff
path: root/Makefile
AgeCommit message (Collapse)AuthorFilesLines
2021-05-25add a gcov target (#498)John Levon1-7/+22
"make gcov" is sufficient to run the tests in DEBUG mode and generate gcov output for each .c file in lib/, to give us some idea of our coverage. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2021-05-20use cmake3 if available (#503)John Levon1-6/+4
Currently, on systems with both cmake and cmake3, we require cmake even if cmake3 is the only cmake version available (and SPDK encodes this silly requirement). Use and prefer "cmake3" if available. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2021-05-10start python-based testing framework (#447)John Levon1-2/+51
Trying to do our unit/functional testing with C is very tedious, and cmocka especially is a continual pain point. This commit introduces a Python-based testing infrastructure, and adds an initial set of functional tests for client negotiation. The tests work under Valgrind for leak/bad access detection of the C code, but not under ASAN, which lacks any meaningful shared-library support. We should be able to replace all of current C-based unit tests with this, reverting samples/ back to demo code only. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
2021-03-01run unit tests under valgrind too (#358)John Levon1-0/+1
If we're not running ASAN, use valgrind. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2021-02-10fix pre-push build order (#326)John Levon1-4/+4
Re-order so we don't end up with an ASAN-enabled build at the end; purely for convenience. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2021-02-04add AddressSanitizer run (#291)John Levon1-0/+9
Run unit tests with -fsanitize-address too. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-12-16fix clang build (#210)John Levon1-2/+5
Also add clang to pull request build checks. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-12-11allow over-riding "cmake" (#184)John Levon1-1/+3
Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-12-02add pre-push target (#150)John Levon1-3/+6
Add a target that builds in debug and release mode and runs the tests in each. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-25add "make test"; run it in pre-commit (#127)John Levon1-0/+3
Also rename test.c to reflect it should cover unit tests. Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com> Signed-off-by: John Levon <john.levon@nutanix.com>
2020-11-19enable assert() in release builds (#98)John Levon1-1/+0
2020-11-16Makefile: Remove unused KDIRSwapnil Ingle1-2/+0
Also remove kernel build from travis.yml Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-05-20allow installation location to be overriddenThanos Makatos1-0/+2
This allows package systems to use /usr (instead of CMake's default /usr/local), which is the typical choice.
2019-11-02Fix various format issuesFelipe Franciosi1-1/+1
Remove various spurious whitespaces and empty lines. Some other alignment issues, too. Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
2019-09-05Initial commitFelipe Franciosi1-0/+74