Skip to content

Support optional isolated venv for Avocado bootstrap - #403

Merged
PraveenPenguin merged 1 commit into
lop-devops:masterfrom
bssrikanth:venv
Aug 19, 2026
Merged

Support optional isolated venv for Avocado bootstrap#403
PraveenPenguin merged 1 commit into
lop-devops:masterfrom
bssrikanth:venv

Conversation

@bssrikanth

Copy link
Copy Markdown
Collaborator

Keep the existing system-wide pip path as default. Add --use-venv / AVOCADO_USE_VENV for a clean virtualenv install that avoids distro package conflicts.

Keep the existing system-wide pip path as default.
Add --use-venv / AVOCADO_USE_VENV for a clean virtualenv
install that avoids distro package conflicts.

Signed-off-by: Srikanth Aithal <Srikanth.Aithal@amd.com>
@bssrikanth

Copy link
Copy Markdown
Collaborator Author

@PraveenPenguin @narasimhan-v could you please review. I have tested this patch against below scenarios:

Venv Patch — Test Scenarios Validated

Result: All Pass

  1. Baseline without venv — Run guest suite without --use-venv.
  2. Fresh venv bootstrap — Bootstrap with --bootstrap --use-venv --enable-kvm.
  3. Guest run in venv mode — Run guest suite with --use-venv.
  4. Venv clean — Run --clean --use-venv.
  5. Venv rebuild after clean — Re-bootstrap with --use-venv after venv clean.
  6. Guest run with existing image — Run with --use-venv --no-download when guest image is present.
  7. Guest re-download when image missing — Run with --use-venv without --no-download.
  8. Switch from venv to system mode — Run guest suite without --use-venv after venv usage.
  9. Switch from system back to venv — Run guest suite with --use-venv after system bootstrap.
  10. Recovery after plain clean — Run --clean, then --run-suite --use-venv.
  11. Env var bootstrap — Bootstrap with AVOCADO_USE_VENV=1 (no CLI flag).
  12. Env var run — Run guest suite with AVOCADO_USE_VENV=1.
  13. Orphan venv survives plain clean — After --clean without --use-venv, .venv remains on disk.
  14. Run after orphan venv + deep clean — After plain --clean, run with --use-venv.
  15. System and venv installs coexist — Bootstrap system-wide, then bootstrap with --use-venv.
  16. Venv takes precedence over system — With both installed, run with --use-venv.
  17. Bootstrap without guest download--bootstrap --use-venv --no-download when guest image exists.
  18. Run after no-download bootstrap — Run guest suite with --no-download --use-venv.
  19. Host-only venv bootstrap--bootstrap --use-venv without --enable-kvm.
  20. Host-only venv run--run-suite host_sanity --use-venv.

@narasimhan-v narasimhan-v self-assigned this Aug 12, 2026

@PraveenPenguin PraveenPenguin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@PraveenPenguin
PraveenPenguin merged commit 8083777 into lop-devops:master Aug 19, 2026
4 checks passed
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.

3 participants