Pasuereplay feature - #401
Open
PraveenPenguin wants to merge 8 commits into
Open
Conversation
Add optional resume_job_dir parameter to run_test() to support resume mode. Defaults to None so all existing call sites are unaffected. Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
Move the existing nrun/cmd build logic into an else branch to prepare for resume_job_dir handling in the if branch. No functional change to normal runs. Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
When resume_job_dir is set, extract the job ID from the job dir name and invoke 'avocado replay <job_id>'. Modern avocado replay re-runs only the not-passed tests from the prior job automatically, works for both host and guest suites without extra flags. Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
Add --resume flag to argparse. When set the wrapper uses the existing outputdir to scan prior job results and resume from where the run was interrupted. Usage: python avocado-setup.py --run-suite host_a,host_b,host_c --resume Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
On --resume, scan all job-* subdirs in outputdir and build suite_job_map mapping suite_name to its prior job dir path. Host suites matched by test file basename in avocado test IDs. Guest suites matched by suite shortname in VT test IDs. Job dirs with no/unreadable results.json stored as __interrupted__ fallback (system crashed before results were written). Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
_suite_completed: returns True when a suite has a prior job dir with a clean results.json (total > 0, interrupt == 0). _suite_replay_dir: returns the prior job dir to replay for a suite, or None when the suite never ran (no job dir) so it runs fresh. Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
On --resume, for each suite in order: - completed (clean results.json) -> skip with logged message - interrupted (no/partial results) -> avocado replay <job_id> - never ran (no job dir at all) -> normal fresh run Suites that never ran (e.g. system rebooted before they started) receive None from _suite_replay_dir and run fully fresh. Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
Add --resume to the script help output block and add a new argument details entry (item 20) explaining: - What --resume does (scans results dir, classifies suites) - The three states: completed/skip, interrupted/replay, never ran/fresh - Usage examples with and without --output-dir - Note that --run-suite must match the original run - Works for both host and guest test suites Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
Collaborator
Author
|
log : |
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.