X Tutup
Skip to content

Commit 11685cc

Browse files
authored
Merge pull request containerd#6743 from Jordy24/makehelp
added make help for cri integration
2 parents bbabe76 + cf571fa commit 11685cc

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

BUILDING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ During the automated CI the unit tests and integration tests are run as part of
237237
- `make test`: run all non-integration tests that do not require `root` privileges
238238
- `make root-test`: run all non-integration tests which require `root`
239239
- `make integration`: run all tests, including integration tests and those which require `root`. `TESTFLAGS_PARALLEL` can be used to control parallelism. For example, `TESTFLAGS_PARALLEL=1 make integration` will lead a non-parallel execution. The default value of `TESTFLAGS_PARALLEL` is **8**.
240+
- `make cri-integration`: [CRI Integration Tests](https://github.com/containerd/containerd/blob/main/docs/cri/testing.md#cri-integration-test) run cri integration tests
240241

241242
To execute a specific test or set of tests you can use the `go test` capabilities
242243
without using the `Makefile` targets. The following examples show how to specify a test

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ bin/cri-integration.test:
209209
@echo "$(WHALE) $@"
210210
@$(GO) test -c ./integration -o bin/cri-integration.test
211211

212-
cri-integration: binaries bin/cri-integration.test ## run cri integration tests
212+
cri-integration: binaries bin/cri-integration.test ## run cri integration tests (example: FOCUS=TestContainerListStats make cri-integration)
213213
@echo "$(WHALE) $@"
214214
@bash -x ./script/test/cri-integration.sh
215215
@rm -rf bin/cri-integration.test

docs/cri/testing.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,19 @@ Before sending pull requests you should at least make sure your changes have pas
88
Follow the [building](../../BUILDING.md) instructions.
99

1010
## CRI Integration Test
11-
* Run CRI integration test:
11+
* Run all CRI integration tests:
1212
```bash
1313
make cri-integration
1414
```
15+
* Run specific CRI integration tests: use the `FOCUS` parameter to specify the test case.
16+
```bash
17+
# run CRI integration tests that match the test string <TEST_NAME>
18+
FOCUS=<TEST_NAME> make cri-integration
19+
```
20+
Example:
21+
```bash
22+
FOCUS=TestContainerListStats make cri-integration
23+
```
1524
## CRI Validation Test
1625
[CRI validation test](https://github.com/kubernetes-sigs/cri-tools/blob/master/docs/validation.md) is a test framework for validating that a Container Runtime Interface (CRI) implementation such as containerd with the `cri` plugin meets all the requirements necessary to manage pod sandboxes, containers, images etc.
1726

0 commit comments

Comments
 (0)
X Tutup