File: test.md

package info (click to toggle)
lava 2026.01-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 30,844 kB
  • sloc: python: 82,790; javascript: 16,658; sh: 1,364; makefile: 328
file content (57 lines) | stat: -rw-r--r-- 929 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Testing LAVA

## Code style

We use [black] to format the LAVA source code.

The GitLab CI will run black on every merge request.

You can run it locally:

```shell
apt-get install black
black lava/
```

## Unittests

We use [pytest] for the python test harness.

To run the full test suite:

```shell
python3 -m pytest -v tests/
```

You can execute every tests that are defined in a given file:

```shell
python3 -m pytest -v tests/lava_dispatcher/test_utils.py
```

You can also execute a specific test:
```shell
python3 -m pytest -v tests/lava_dispatcher/test_utils.py::test_simple_clone
```

## Static analysis

We use [pylint] and [bandit] for static analysis.

You can run them locally:

```shell
.gitlab-ci/analyze/pylint.sh
bandit -r .
```

## Job schema

If you change the device or job schemas, you will have to ensure that the device and job schemas are valid.

This is checked by:

```shell
```

--8<-- "refs.txt"