@@ -17,10 +17,33 @@ The unit tests do not execute actual virtual machines.
1717
1818The integration tests incurs actual execution of virtual machines.
1919
20- The integration tests are written in bash and partially in Perl.
20+ The integration tests are written in [ BATS (Bash Automated Testing System)] ( https://github.com/bats-core/bats-core ) .
21+
22+ Run the following commands to run the BATS tests:
23+
24+ ``` bash
25+ git submodule update --init --recursive
26+ make bats
27+ ```
28+
29+ The BATS tests are located located under [ ` hack/bats/tests ` ] ( https://github.com/lima-vm/lima/tree/master/hack/bats/tests ) .
30+
31+ ### Extra tests
32+ There are also extra tests ([ ` hack/bats/extras ` ] ( https://github.com/lima-vm/lima/tree/master/hack/bats/extras ) ) that are not automatically
33+ invoked from ` make bats ` .
34+
35+ Run the following command to run the extra BATS tests:
36+
37+ ``` bash
38+ ./hack/bats/lib/bats-core/bin/bats ./hack/bats/extras
39+ ```
40+
41+ ## Template-specific tests
42+
43+ Tests that are specific to template files are written in bash and partially in Perl.
2144
2245Use [ ` hack/test-templates.sh ` ] ( https://github.com/lima-vm/lima/blob/master/hack/test-templates.sh )
23- to execute integration tests, with a virtual machine template file, e.g.,:
46+ to execute tests, with a virtual machine template file, e.g.,:
2447
2548``` bash
2649./hack/test-templates.sh ./templates/default.yaml
@@ -31,9 +54,9 @@ to execute integration tests, with a virtual machine template file, e.g.,:
3154## CI
3255
3356[ ` .github/workflows/test.yml ` ] ( https://github.com/lima-vm/lima/blob/master/.github/workflows/test.yml )
34- executes the unit tests and the integration tests on the GitHub Actions with the [ "Tier 1"] ( ../../templates/ ) templates.
57+ executes the tests on the GitHub Actions with the [ "Tier 1"] ( ../../templates/ ) templates.
3558
36- Most integration tests are executed on Linux runners, as macOS runners are slow and flaky.
59+ Most tests are executed on Linux runners, as macOS runners are slow and flaky.
3760
3861The tests about macOS-specific features (e.g., vz and vmnet) are still executed on macOS runners.
3962
0 commit comments