You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tests/SystemTests.md
+36-3Lines changed: 36 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,17 @@ System Tests are tests designed to test the entire system as a black box,
4
4
including all components and dependencies.
5
5
We usually build it in release mode, so we test exactly what we are delivering.
6
6
7
-
Currently, these are only available for the POSIX platform.
7
+
Currently, these are available for POSIX and Zephyr platforms.
8
8
9
9
However, these are also sometimes reused for memory [leak checks](LeakChecks.md) and [source code coverage generation](CoverageReports.md).
10
10
In these cases, Ocre needs to be built with instrumentation so it is not testing the release build.
11
11
For more information on those, refer to their specific documentation.
12
12
13
13
These tests are configured in the CI workflows as a quality gate. All PRs must pass all of them.
14
14
15
-
## Build and run
15
+
## Linux
16
+
17
+
### Build and run
16
18
17
19
Create a build directory and navigate to it:
18
20
@@ -47,7 +49,7 @@ You can also run the individual test executable binaries `test_*` in the build d
47
49
48
50
Note that the tests must be run from the build directory, because they look for images in the current working directory + `./ocre/src/ocre/var/lib/ocre/images/`.
49
51
50
-
## Details
52
+
###Details
51
53
52
54
The individual test binaries:
53
55
@@ -62,3 +64,34 @@ Follow a similar pattern. `test_lib` is testing the general library initializati
62
64
`test_container` tests the specific functionality of a specific container.
63
65
64
66
Please, refer to their source code for more details.
67
+
68
+
## Zephyr
69
+
70
+
### Build and run
71
+
To build the Zephyr system tests for the `native_sim_64` board:
72
+
73
+
```sh
74
+
west build -p always -b native_sim/native/64 tests/system/zephyr/context
75
+
```
76
+
77
+
Replace `context` with `container`, `lib`, or `ocre` to build different tests:
78
+
79
+
-`tests/system/zephyr/lib` - Tests the general library initialization functions
80
+
-`tests/system/zephyr/ocre` - Tests the Ocre library and management of contexts
81
+
-`tests/system/zephyr/context` - Tests context functionality, creating and managing the lifetime of containers
82
+
-`tests/system/zephyr/container` - Tests the specific functionality of a container
83
+
84
+
To run the test:
85
+
```sh
86
+
west build -t run
87
+
```
88
+
89
+
The last lines of the output will be something like:
90
+
```
91
+
-----------------------
92
+
25 Tests 0 Failures 0 Ignored
93
+
OK
94
+
```
95
+
96
+
### Details
97
+
Each test must be run individually. Run the build command for one test at a time, then execute `west build -t run` to run that specific test.
0 commit comments