Skip to content

enhance pasue and replay based on variant - #402

Open
PraveenPenguin wants to merge 4 commits into
lop-devops:masterfrom
PraveenPenguin:pasuerr
Open

enhance pasue and replay based on variant #402
PraveenPenguin wants to merge 4 commits into
lop-devops:masterfrom
PraveenPenguin:pasuerr

Conversation

@PraveenPenguin

Copy link
Copy Markdown
Collaborator

No description provided.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant