tests: add check_unittests helper function#13642
Conversation
2e90eaf to
9324a9e
Compare
|
All tests are passing except this one which is unrelated. |
miri64
left a comment
There was a problem hiding this comment.
In general, good idea, but there is room for improvement IMHO.
9324a9e to
ec6af8f
Compare
|
Thanks for the review and suggestion @miri64. I adapted the PR and the tests I think you talking about. In the meantime, I slightly reworked the script of some package tests. |
6af7acf to
cb75145
Compare
miri64
left a comment
There was a problem hiding this comment.
Except for the error pointed out by Murdock (and me above) this looks good now. Please squash.
in pkg_c25519, pkg_libcose and pkg_tweetnacl, use the check_unittests helper function and rework the way the test TIMEOUT value is determined
cb75145 to
10b7d5f
Compare
miri64
left a comment
There was a problem hiding this comment.
ACK. Consolidating similar functionality to a common test absolutely makes sense. If something is broken, Murdock will figure that out.
|
Only thing to consider is, if the placement of the function within the module is best considering #10949. |
Looking at #10949 and there will be some adaption required but that doesn't seem like a big problem. Regarding the placement, I would say that it helps. |
Contribution description
This PR introduces the
check_unittestshelper function and make use of it with tests using the embUnit module.For these tests all
testfuncare almost the same, so this PR removes a lot of duplication.check_unittestsalso takes annb_testsparameter to specify the expected number of successful tests. If the parameter is not set, the default regexp\d+is used.All candidate tests are updated to make use of this new function.
Testing procedure
A green Murdock with
CI: run testslabel setIssues/PRs references
None