Closed dewyatt closed 7 years ago
Can I give three thumbs up for this? :-)
I can do this when will be updating cmocka with CLI tests. Probably we should also remove current contents of tests directory, they seems a bit outdated? Another idea - some tests worth running multiple times (like low-level ecdsa/eddsa key generation/signing), probably cmocka allow it. Or just update tests themselves.
some tests worth running multiple times
@ni4 I believe @catap added some support for this in 6d550494ce503d2ee8c555c11349d740df336b95. Looking at it now though, I think it needs some work. I would expect the loop to just call cmocka_run_group_tests
multiple times and do an early exit if ret != 0
. It seems like the result isn't currently used. Anyways, maybe you can build on that.
I can do this when will be updating cmocka with CLI tests.
@ni4 Also I think it would be helpful if you could do this in a separate PR, that ought to be quicker and easier to review.
Probably we should also remove current contents of tests directory, they seems a bit outdated?
I think there was some discussion about this and @ronaldtse had some input I can't recall.
@dewyatt Sure. Previous two PRs were huge and messy due to large amount of breaking changes, which then were merged together with new live changes which used older codebase. I don't like such PRs as well.
As a sidenote here, but maybe it worth a separate ticket: it also would be nice from the packaging point of view to get all of tests (both cmocka and CLI tests) integrated into automake and invoked by a single call of make check
.
Agree to make check
!
@ni4 my input to removing tests
/ tst
directories, is a resounding yes as long as we have a CLI tester. You've done it in Python, right? If we can merge that it'll be fantastic.
@ronaldtse Yeah, I started in Python for performance tests, and then will add functionality tests. So will merge that in once ready
Looking forward to it, thanks @ni4 !
Fixed with #314
Description
I was thinking we can improve the file structure and naming in
src/cmocka
. We have all source files prefixed withrnp_tests_
which is a bit redundant. Also the directory namecmocka
seems unnecessarily implementation-specific and could probably just betests
(ortests/cmocka
)?I was thinking something along these lines would be a minor improvement:
In the future it may make sense to split the tests up more and maybe add some subdirs that test specific components, etc.
But I think the above is at least a small step towards something slightly more organized.
EDIT: typo