-
Notifications
You must be signed in to change notification settings - Fork 183
flowey: add new vmm-tests-run command #3167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f98d759
dd1f932
2d0f7fa
db026a1
e2865b1
533404e
3b06559
8cbceae
371a87a
2f26ac1
b097542
1eaa285
1fa82ef
5f953fc
0eee2db
95f1a2d
822877f
bbb2767
399d6ab
2d88075
c801ef2
7c3444b
d805720
fd318ca
c8cf21a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,26 +82,46 @@ locally, set the following environment variable: `PETRI_REPORT_UNSTABLE_FAIL=1` | |
|
|
||
| ## Running VMM Tests (Flowey) | ||
|
|
||
| The easiest way to run the VMM tests locally is using the | ||
| `cargo xflowey vmm-tests` command. To see the most up-to-date options, run: | ||
| `cargo xflowey vmm-tests --help`. When running Hyper-V tests, you will need | ||
| to use an administrator terminal window (this works even if you are running | ||
| from WSL2). When running Windows tests, the output dir should be on the | ||
| Windows file system. For example, from WSL2: | ||
| The easiest way to run VMM tests locally is `cargo xflowey vmm-tests-run`. It | ||
| automatically discovers required artifacts, builds dependencies, and runs your | ||
| tests in a single command. | ||
|
|
||
| To run a **specific test** (or set of tests), use `--filter` with a | ||
| [nextest filter](https://nexte.st/docs/filtersets/) expression: | ||
|
|
||
| ```bash | ||
| cargo xflowey vmm-tests --target windows-x64 --dir /mnt/e/vmm_tests | ||
| cargo xflowey vmm-tests-run --filter "test(my_test_name)" --dir /tmp/vmm-tests-run | ||
| ``` | ||
|
|
||
| This command will build or download all the test dependencies and copy them | ||
| to a self-contained folder that can be copied to another system for testing. | ||
| The folder will contain scripts for installing dependencies | ||
| (install_deps.ps1 on Windows) and running the tests (run.ps1 on Windows). | ||
| You can either specify a list of flags to disable certain tests and avoid | ||
| building/downloading some dependencies, or you can specify a custom | ||
| [nextest filter](https://nexte.st/docs/filtersets/) and list of artifacts. | ||
| In this case, all possible dependencies will be obtained since deriving them | ||
| from a test filter is not yet supported. | ||
| ### Targeting a Platform | ||
|
|
||
| By default, `vmm-tests-run` builds for the current host. Use `--target` to | ||
| build for a different platform. The supported targets are: | ||
|
|
||
| | Target | Description | | ||
| |--------|-------------| | ||
| | `windows-x64` | Windows x86_64 (Hyper-V / WHP) | | ||
| | `windows-aarch64` | Windows ARM64 (Hyper-V / WHP) | | ||
| | `linux-x64` | Linux x86_64 | | ||
chris-oo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| **Cross-compiling for Windows from WSL2** is fully supported, you can build | ||
| and run Windows VMM tests directly from your WSL2 shell. This requires the | ||
| cross-compilation environment to be set up first. | ||
|
|
||
| Then target Windows as usual. The output directory **must** be on the Windows | ||
| filesystem (e.g., `/mnt/d/...`): | ||
|
|
||
| ```bash | ||
| cargo xflowey vmm-tests-run --target windows-x64 --dir /mnt/d/vmm_tests | ||
| ``` | ||
|
|
||
| For full cross-compilation setup instructions, see | ||
| [Cross Compiling for Windows](../getting_started/cross_compile.md). | ||
|
|
||
| When running Hyper-V tests, your user account must be a member of the | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll probably answer myself as I read on, but: does |
||
| Hyper-V Administrators group. | ||
|
|
||
| To see all available options: `cargo xflowey vmm-tests-run --help`. | ||
|
|
||
| ## Running VMM Tests (Manual) | ||
|
|
||
|
|
@@ -133,7 +153,7 @@ which provide detailed instructions on how to build / acquire the missing | |
| artifact. Some dependencies can only be built on Linux (OpenHCL and Linux | ||
| pipette, for example). If you are building on Linux and want to run Windows | ||
| guest tests, pipette will need to be | ||
| [cross compiled for Windows](#linux-cross-compiling-pipetteexe). | ||
| [cross compiled for Windows](#linux-cross-compiling-pipetteexe). | ||
|
|
||
| ```admonish warning | ||
| `cargo nextest run` won't rebuild any of your changes. Make sure you `cargo build` | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,7 +76,7 @@ Use the `-GuestStateIsolationType OpenHCL` parameter to `New-VM`. The following | |
|
|
||
| ```powershell | ||
| # Names, directories, etc. | ||
| # cargo xflowey will do some heavy lifting for you. You can run `cargo xflowey vmm-tests --build-only --dir /mnt/q/win-vmm-tests ...` from your WSL to get images, compiled OpenHCL, etc. See [cross-compile](../../../dev_guide/getting_started/cross_compile.md) and [vmm-test](../../../dev_guide/tests/vmm.md) docs for additional info. | ||
| # cargo xflowey will do some heavy lifting for you. You can run `cargo xflowey vmm-tests-run --build-only --dir /mnt/q/win-vmm-tests ...` from your WSL to get images, compiled OpenHCL, etc. See [cross-compile](../../../dev_guide/getting_started/cross_compile.md) and [vmm-test](../../../dev_guide/tests/vmm.md) docs for additional info. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this correct?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (I guess it is). Feel free to ignore my bikeshedding, but why are you adding four more characters to what I need to type or copy as part of my hot loop, and breaking muscle memory? :) |
||
| $repoDir = "home\<your-wsl-username-for-example>\openvmm" # for prereqs below, the path relative to the root of your WSL file system where you have cloned the openvmm repo | ||
|
|
||
| $VmName = "OpenHCLTestVM" | ||
|
|
@@ -144,7 +144,7 @@ While these steps guide you to create a second SCSI controller, your generation | |
|
|
||
| ```powershell | ||
| # Names, directories, etc. | ||
| # cargo xflowey will do some heavy lifting for you. You can run `cargo xflowey vmm-tests --build-only --dir /mnt/q/win-vmm-tests ...` from your WSL to get images, compiled OpenHCL, etc. See [cross-compile](../../../dev_guide/getting_started/cross_compile.md) and [vmm-test](../../../dev_guide/tests/vmm.md) docs for additional info. | ||
| # cargo xflowey will do some heavy lifting for you. You can run `cargo xflowey vmm-tests-run --build-only --dir /mnt/q/win-vmm-tests ...` from your WSL to get images, compiled OpenHCL, etc. See [cross-compile](../../../dev_guide/getting_started/cross_compile.md) and [vmm-test](../../../dev_guide/tests/vmm.md) docs for additional info. | ||
| $repoDir = "home\<your-wsl-username-for-example>\openvmm" # for prereqs below, the path relative to the root of your WSL file system where you have cloned the openvmm repo | ||
|
|
||
| $VmName = "OpenHCLTestVM" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.