Repository navigation
tests: split kins-params into one test per kinematics module - #4952
grandixximo wants to merge 2 commits into
Conversation
|
Hm, I had actually expected to see a split on basis of kinematics, not on tested parameter. Not every kinematics share all tested parameter, which makes it more difficult to se what belongs to what. Additionally, if you keep one type of kinematics, wouldn't you be able to run all tests in one go as you do not need to reload RT for each test? |
|
(maybe my mind lacks the right amount of degrees of freedom the kinematics provides to understand your choice of split) |
4463cb2 to
5eff7e4
Compare
|
Your degrees of freedom were fine; my split was in a singularity. Now one test per module. One load per module saves little: most entries differ in their loadrt parameters, so they reload anyway, at about 0.1 s each. The split is not cheaper overall (27 checker compiles), but no single test grows with every new module any more. |
kins-params ran every module one after another in one test, and grows by an entry or two with every module. It is now one test per module, tests/kins-params/5axiskins and so on, sharing the run function, check.py and the realtime checker from tests/kins-params, so runtests -j runs them at the same time and each module's entries sit together. Each test builds the checker under its own name, paritycheck_5axiskins and so on, so one test never installs over the module file another is loading. Each checkresult asks for its own entry count, so a dropped entry still fails. Same 44 entries as before. In the sandbox the old test takes 4.5 s; the 27 take 9.5 s one after another and 2.0 s at runtests -j 8. Deleting one entry from 5axiskins fails it.
5eff7e4 to
99067d4
Compare
The in-tree userkins linked kins_single and kins_util into the module, where a halcompile build of the same file takes them from kins_single_core. The same source then gave two different modules, and with kins_single_core loaded the in-tree one exported the same symbols as the core. Build it without them: like switchkinscomp on switchkins_core, userkins now runs behind kins_single_core, and the kins-params test loads the stock module instead of a renamed copy.
As Bertho suggested in #4942: kins-params ran every module one after another and grows by an entry or two with every module.
It is now one test per kinematics module, tests/kins-params/5axiskins and so on, sharing the run function, check.py and the realtime checker in tests/kins-params, so runtests -j runs them side by side and each module's entries sit together. Each test builds the checker under its own name (
paritycheck_5axiskinsand so on), so one test never installs over the module file another is loading. Each checkresult asks for its own entry count, so a dropped entry still fails.The second commit builds userkins in tree the way halcompile builds it. The in-tree build linked the shared kinematics code into the module, so the same source gave a different module out of tree, and with kins_single_core loaded both exported the same symbols. userkins now runs behind kins_single_core, as switchkinscomp runs behind switchkins_core, and the tests load both stock templates instead of renamed copies. A bare
loadrt userkinsnow fails with an undefined symbol; no shipped config loads it.The entries are the same as before, less the userkins copy, which matched the stock userkins entry: 43. The split is not cheaper overall (26 checker compiles); no single test grows with every module any more. Deleting one entry from 5axiskins fails that test.