summaryrefslogtreecommitdiff
path: root/zephyr/test/drivers/README.md
blob: 7dfc5c51e592b143557ffbd83b800b386ffbb48e (plain)
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
This is the drivers test directory. The goal is to have many driver test suites
in few binaries, so that compile time will be faster than many small tests, and
so we can test interactions between different subsystems easily.

## Run all the test suites

```bash
(chroot) ec $ ./twister -T zephyr/test/drivers
```

To see all the output of twister in stdout (for example if the build fails)

```bash
(chroot) ec $ ./twister -v -i -T zephyr/test/drivers
```

## Code coverage

See the [EC code coverage] doc.

## Debugging

You need the host version of gdb:

```bash
(chroot) sudo emerge -j sys-devel/gdb
```

Build all the drivers tests
```bash
(chroot) ec $ ./twister -b -T zephyr/test/drivers
```

Then run gdb

Example of running gdb on the `drivers.default` test binary:

```
(chroot) ec $ gdb twister-out/native_posix/drivers.default/zephyr/zephyr.exe
# Set breakpoints, run, etc.
```

Another of running gdb now on the `drivers.chargesplash` test binary:

```
(chroot) ec $ gdb twister-out/native_posix/drivers.chargesplash/zephyr/zephyr.exe
```

[EC code coverage]: ../../../docs/code_coverage.md#zephyr-ztest-code-coverage