cern-fts / davix

High-performance file management over WebDAV / HTTP
GNU Lesser General Public License v2.1
84 stars 36 forks source link

Include CTest module #79

Closed ellert closed 3 years ago

ellert commented 3 years ago

So that calling ctest actually runs the test.

mpatrascoiu commented 3 years ago

Hello Mattias,

I'm not sure what was the intention of Georgios, whether he removed CTest by mistake or he planned to stop using it altogether.

Other projects under DMC moved away from CTest.

ellert commented 3 years ago

How do you run the tests? The CMakeList.txt files uses add_test(). This adds a test to the set of tests ctest runs, but if the CTest module is not included add_test() is a no-op. The spec file runs ctest in the %check section. Without including the CTest module, this invocation does not run any tests but simply says "no tests found". Do you run the tests some other way?

mpatrascoiu commented 3 years ago

I'm not sure we still have a %check section in the Davix specfile.

We run the tests in the gitlab-CI pipeline by executing davix-unit-tests. [1] This executable is provided by the davix-tests package.

[1] .gitlab-ci.yaml#L144

ellert commented 3 years ago

OK, so instead of calling ctest I can use the following %check section:

%check
%{_vpath_builddir}/test/unit/davix-unit-tests

That works without the proposed change in this PR.

mpatrascoiu commented 3 years ago

I believe this is the best way to go forward. I will mark this ticket as closed, then.

Thanks again for the Davix support!