Skip to content

Commit 5347665

Browse files
doc: update DEVEL.md for e2e tests
Signed-off-by: Hyeongju Johannes Lee <[email protected]>
1 parent 5513302 commit 5347665

File tree

1 file changed

+82
-9
lines changed

1 file changed

+82
-9
lines changed

DEVEL.md

Lines changed: 82 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -183,34 +183,107 @@ container images with the executables under test must be available in the
183183
cluster. If these two conditions are satisfied, run the tests with:
184184

185185
```bash
186-
$ go test -v ./test/e2e/...
186+
# Run all e2e tests in this repository
187+
go test -v ./test/e2e/...
187188
```
188189

189-
In case you want to run only certain tests, e.g., QAT ones, run:
190+
If you need to specify paths to your custom `kubeconfig` containing
191+
embedded authentication info then add the `-kubeconfig` argument:
190192

191193
```bash
192-
$ go test -v ./test/e2e/... -args -ginkgo.focus "QAT"
194+
go test -v ./test/e2e/... -args -kubeconfig /path/to/kubeconfig
193195
```
194196

195-
If you need to specify paths to your custom `kubeconfig` containing
196-
embedded authentication info then add the `-kubeconfig` argument:
197+
The full list of available options can be obtained with:
197198

198199
```bash
199-
$ go test -v ./test/e2e/... -args -kubeconfig /path/to/kubeconfig
200+
go test ./test/e2e/... -args -help
200201
```
201202

202-
The full list of available options can be obtained with:
203+
In most cases, it would not be possible to run all E2E tests in one system.
204+
For running a subset of tests, there are labels that you can use to pick out specific parts.
205+
You can run the tests with:
206+
```bash
207+
# Run a subset of tests
208+
go test -v ./test/e2e/... -args -ginkgo.focus <labels in regex> -ginkgo.skip <labels in regex>
209+
```
210+
211+
#### Table of Labels
212+
213+
| Device | Mode | Resource | App |
214+
|:-------|:-----------------|:------------|:-------------------------------|
215+
| `dlb` |- | `pf`, `vf` | `libdlb` |
216+
| `dsa` |- | `dedicated` | `accel-config` |
217+
| `fpga` | `af`, `region` | | `opae-nlb-demo` |
218+
| `gpu` |- | `i915` | `busybox`, `tensorflow` |
219+
| `iaa` |- | `dedicated` | `accel-config` |
220+
| `qat` | `dpdk` | `dc` | `openssl` |
221+
| `qat` | `dpdk` | `cy` | `openssl`, `crypto-perf` |
222+
| `qat` | `dpdk` | `generic` | `crypto-perf`, `compress-perf` |
223+
| `qat` | `kernel` | `cy1_dc0` | `busybox` |
224+
| `sgx` |- | | `sgx-sdk-demo` |
225+
226+
#### Examples
227+
228+
```bash
229+
# DLB for VF resource without any app running
230+
go test -v ./test/e2e/... -args -ginkgo.focus "Device:dlb.*Resource:vf.*App:noapp"
231+
232+
# FPGA with af mode with opae-nlb-demo app running
233+
go test -v ./test/e2e/... -args -ginkgo.focus "Device:fpga.*Mode:af.*App:opae-nlb-demo"
234+
235+
# GPU with running only tensorflow app
236+
go test -v ./test/e2e/... -args -ginkgo.focus "Device:gpu.*App:tensorflow"
237+
#or
238+
go test -v ./test/e2e/... -args -ginkgo.focus "Device:gpu" -ginkgo.skip "App:busybox"
239+
240+
# QAT for qat4 cy resource with openssl app running
241+
go test -v ./test/e2e/... -args -ginkgo.focus "Device:qat.*Resource:cy.*App:openssl"
242+
243+
# QAT with dpdk mode for qat2 generic resource with all apps running
244+
go test -v ./test/e2e/... -args -ginkgo.focus "Device:qat.*Resource:generic.*App:(crypto-perf|compress-perf)"
245+
246+
# SGX without running sgx-sdk-demo app
247+
go test -v ./test/e2e/... -args -ginkgo.focus "Device:sgx" -ginkgo.skip "App:sgx-sdk-demo"
248+
249+
# All of Sapphire Rapids device plugins
250+
go test -v ./test/e2e/... -args -ginkgo.focus "Device:(dlb|dsa|iaa|qat|sgx)"
251+
```
252+
253+
## Predefined E2E Tests
254+
255+
It is possible to run predefined e2e tests with:
256+
```
257+
make e2e-<device> [E2E_LEVEL={basic|full}] [FOCUS=<labels in regex>] [SKIP=<labels in regex>]
258+
```
259+
260+
| `E2E_LEVEL` | Equivalent `FOCUS` or `SKIP` | Explanation |
261+
:-------------- |:---------------------------- |:------------------------------------------------------------------------------------------------ |
262+
| `basic` | `FOCUS=App:noapp` | `basic` does not run any app pod, but checks if the plugin works and the resources are available |
263+
| `full` | `SKIP=App:noapp` | `full` checks all resources, runs all apps except the spec kept for no app running |
264+
265+
### Examples
203266

204267
```bash
205-
$ go test ./test/e2e/... -args -help
268+
# DLB for both of pf and vf resources with running libdlb app
269+
make e2e-dlb E2E_LEVEL=full
270+
271+
# QAT for cy resource with running only openssl app
272+
make e2e-qat FOCUS=Resource:cy.*App:openssl
273+
274+
# QAT for dc resource without running any app
275+
make e2e-qat E2E_LEVEL=basic FOCUS=Resource:dc
276+
277+
# GPU without running tensorflow app
278+
make e2e-gpu E2E_LEVEL=full SKIP=tensorflow
206279
```
207280

208281
It is also possible to run the tests which don't depend on hardware
209282
without a pre-configured Kubernetes cluster. Just make sure you have
210283
[Kind](https://kind.sigs.k8s.io/) installed on your host and run:
211284

212285
```
213-
$ make test-with-kind
286+
make test-with-kind
214287
```
215288

216289
### Run Controller Tests with a Local Control Plane

0 commit comments

Comments
 (0)