Closed kloczek closed 2 years ago
In it's current state, the test/ directory is not ready for ctest integration. Right now it only consists of the unarr-test sample application, which could be used for integration testing, but would require a suitable well-defined test corpus with sample input files to fulfill this role. I do of course have a set of files which I use locally for testing and development, but these are - for various reasons - not suitable for distribution.
I'm currently working on improving the general testing situation and adding the necessary infrastructure for unit tests, adding a test corpus for integration tests and enabling easy fuzzer testing (see #4 ).
Alright, with the latest push, unit tests and integration tests are set up and integrated into the CI. The amount of tests is still very modest, but that will change with time. To build tests, you need to add:
-DBUILD_UNIT_TESTS=ON
-DBUILD_INTEGRATION_TESTS=ON
Unit tests need CMocka to work.
You can also run fuzzing tests:
-DBUILD_FUZZER
I have both options enabled
[tkloczko@devel-g2v SPECS]$ grep TEST rocksdb.spec
-D WITH_ALL_TESTS=ON \
-D WITH_TESTS=ON \
and ctest shows
[tkloczko@pers-jacek x86_64-redhat-linux-gnu]$ ctest -vv
Test project /home/tkloczko/rpmbuild/BUILD/rocksdb-7.7.2/x86_64-redhat-linux-gnu
No tests were found!!!
Uhm no you don't. Compare your options with what I wrote. Or compare with azure-pipelines.yml.
Also, are you sure you are using the correct spec file?
wrong ticket 😄
Looks like test/ content is not integrated with cmake/ctest