Jb3982/#929 test plan running script#974
Conversation
|
The table should be documented in a confluence page. |
|
"Confirm a shortened timeout stops the test and deletes its launch log." |
raghumanimehta
left a comment
There was a problem hiding this comment.
Some parts are unnecessarily complex for example, why have so much stuff being logged?
What is the need for so many states? why delete the logs when "TIMEOUT" occurs? This just assumes that all the test plans will terminate in 5 hours.
You should also aim at reducing the size of PR.
I just wanted to test the system for different cases but not on a 5hour long session rather a smaller timeout value. To quickly test all the cases |
To clarify the logging idea: my alternate idea was to use a rolling log window and retain it only when a test failed, but that would have increased the PR’s complexity. The current implementation redirects ROS launch output to a file to keep the terminal uncluttered and saves the full file. But since we were running tests sequentially and pathfinding is in final trials, I thought we would rarely encounter FAILURE cases so implementing rolling window did make much sense to me.(Sorry I forgot to mention this in meeting today). Now as to why we delete the logs in case of TIMEOUT, my idea was: |
Timeout part is unnecessary. The assumption is poor. Remove that please. Don't delete any logs whatsoever. |
| selected: list[TestPlanInfo] = [] | ||
| selected_names: set[str] = set() | ||
|
|
||
| by_index = {str(plan.index): plan for plan in plans} |
There was a problem hiding this comment.
why do you have three selection criteria?
Why not just run the plans in the same order as user input? Or in th case of no input, in the order that code sees it?
There was a problem hiding this comment.
That is not a selection criteria but a lookup logic {dictionaries} which does not affect execution order. They allow user's each test entry to be resolved by index (1), filename (basic.yaml), or stem (basic).
Selected tests are still run in the order provided by the user. And in the case of no input, resolve_test_plans() randomly selects the requested number of plans, which is separate from this lookup logic.
|
I had to manually add the documentation which you were supposed to do and i asked you to remove the deletion for all termination cases, which I had to edit manually as well. Please make sure that you review all the comments properly from next time onwards. |
Description
run_test_planscommand for running local pathfinding test plans sequentially.ros2 launchterminal output to a per-test log.COMPLETEDandTIMEOUTresults.Verification
ros2 run local_pathfinding run_test_plans -t 1 2 3and verified plan selection, random filling, and live progress output.process has diedoutput.FAILED.Guidance on using
run_test_plans.pyBuild and source the workspace before running the command.
Run the script without arguments to select five test plans randomly:
By default, five test plans are run. Users can select some or all of those plans, and any remaining slots are filled randomly.
List all available test plans
Run selected test plans
Plans can be selected by number, full filename, or filename without the
.yamlextension:The short argument names can also be used and the list of tests space-separated rather than comma-separated:
If
--num_testsis omitted, the selected plans are supplemented with random plans until five tests are selected.Available arguments
-t,--tests.yaml-n,--num_tests5--seed--list--modeglobal_launchdevelopment--log_leveldebug,info,warn,error, orfatalinfo--timeout_hours5.0--goal_threshold_m300.0--save_pathnotebooks/local_pathfinding/session_recordings/test_plans_resultsShow command help
Resources