Skip to content

Commit

Permalink
doc/developer: add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Wenzel committed Jul 29, 2021
1 parent 3f56b62 commit 804ce07
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 22 deletions.
1 change: 1 addition & 0 deletions doc/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@

- [libmicrovmi](./developer/libmicrovmi.md)
- [Python](./developer/python.md)
- [Tests](./developer/tests.md)
- [Release](./developer/release.md)
24 changes: 24 additions & 0 deletions doc/src/developer/tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Integration tests

Instructions for all tests:
- Update the values in `tests/common/config.rs` according to your environment
- `cargo test -- --nocapture`: displays the `log` output, useful for debugging

## KVM

**Requirements**
- virtual machine already configured to be introspected by KVM-VMI
- VM snapshot with live state
- [libkvmi](https://github.com/bitdefender/libkvmi)
- [`virsh`](https://libvirt.org/manpages/virsh.html) tool: (`libvirt-clients` package)


The VM state between each test is handled by the following commands:
- setup: `virsh snapshot-revert <vm_name> --current --running`
- teardown: `virsh destroy <vm_name>`

**Execution**

~~~
cargo test --feature kvm
~~~
23 changes: 1 addition & 22 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
# Integration Tests

Instructions for all tests:
- Update the values in `tests/common/config.rs` according to your environment
- `cargo test -- --nocapture`: displays the `log` output, useful for debugging

## KVM

**Requirements**
- virtual machine already configured to be introspected by KVM-VMI
- VM snapshot with live state
- [libkvmi](https://github.com/bitdefender/libkvmi)
- [`virsh`](https://libvirt.org/manpages/virsh.html) tool: (`libvirt-clients` package)


The VM state between each test is handled by the following commands:
- setup: `virsh snapshot-revert <vm_name> --current --running`
- teardown: `virsh destroy <vm_name>`

**Execution**

~~~
cargo test --feature kvm
~~~
[documentation](https://wenzel.github.io/libmicrovmi/developer/tests.html)

0 comments on commit 804ce07

Please sign in to comment.