Skip to content

Commit 8f0c630

Browse files
committed
doc(tests): document how to run tests in more contexts
Add examples on how to run the integration tests with a different binary or outside of Docker. Signed-off-by: Pablo Barbáchano <[email protected]>
1 parent b197409 commit 8f0c630

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,33 @@ ipdb> test_microvm.help.gdbserver()
570570
571571
You get some instructions on how to run GDB to attach to gdbserver.
572572
573+
## How to run tests with a different version of Firecracker
574+
575+
The integration tests usually compile Firecracker as part of the test
576+
initialization. But there's an option in case we want to run the tests against a
577+
different version of Firecracker, for example a previous release:
578+
579+
```sh
580+
./tools/devtool test -- --binary-dir ../v1.8.0
581+
```
582+
583+
The directory specified with `--binary-dir` should contain at least two
584+
binaries: `firecracker` and `jailer`.
585+
586+
## How to run tests outside of Docker
587+
588+
Tested in Ubuntu 22.04 and AL2023. AL2 does not work due to an old Python (3.8).
589+
590+
```sh
591+
# replace with yum in Fedora/AmazonLinux
592+
sudo apt install python3-pip
593+
sudo pip3 install pytest ipython requests psutil tenacity filelock "urllib3<2.0" requests_unixsocket aws_embedded_metrics pytest-json-report pytest-timeout
594+
cd tests
595+
sudo env /usr/local/bin/pytest integration_tests/functional/test_api.py
596+
```
597+
598+
> :warning: **Notice this runs the tests as root!**
599+
573600
## Sandbox
574601
575602
```sh

0 commit comments

Comments
 (0)