enhance pasue and replay based on variant - #402
Open
PraveenPenguin wants to merge 4 commits into
Open
Conversation
Short 7-char hash suffix extracted from the job dir name is not unique enough when multiple prior jobs share the same suffix — avocado raises ValueError: 'hash is not unique enough'. Switch to passing the full absolute path directly. avocado's get_job_results_dir() accepts a direct path when the directory exists and contains an 'id' file, so no hash lookup is needed at all. Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
…y cmd Wire up replay_path (introduced in the previous commit) into both the logger.info call and the avocado replay command string. Add --resume so avocado skips tests that already PASS/SKIP in the source job and only re-runs the remaining/interrupted tests — without it avocado replays the entire job from scratch. Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
The old two-line docstring did not explain the three decision cases or why the __interrupted__ key is treated differently from a normal suite match. Replace it with an explicit numbered priority list so future readers understand the logic without having to trace through the code. No functional change — docstring only. Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
…→ not in)
The previous condition:
if '__interrupted__' in suite_job_map and suite_name in suite_job_map:
...required suite_name to already be present in suite_job_map, which is
the exact opposite of the intended logic. The __interrupted__ dir should
be claimed by the suite that has NO own entry in suite_job_map — i.e. the
suite that was actively running when the process was killed and never
wrote results.json.
Fix: change 'suite_name in suite_job_map' to 'suite_name not in suite_job_map'.
Symptom fixed:
avocado-setup.py --run-suite host_rasci --resume
restarted hwinfo from test 01/12 instead of resuming from 07/12.
Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.