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/samples/supervisor.md
+82-12Lines changed: 82 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,9 @@ It also preloads the following images:
14
14
-`webserver-complex.wasm`
15
15
-`webserver.wasm`
16
16
17
-
Currently it only supports Zephyr.
17
+
In Zephyr, there is no daemon, and Ocre is run directly from the command line. In Linux there is the `ocred` daemon, which listens in a socket and `ocre` (client) will connect to it.
18
+
19
+
In Linux, a library called OcreClient is used to interact with the daemon. It offers almost the same functionality as the OcreCore library.
18
20
19
21
## Building and running on Zephyr
20
22
@@ -72,34 +74,92 @@ If it is not possible to flash the storage_partition with west, as a workaround,
72
74
it is possible to use the [Supervisor] with `ocre pull` to populate the images
73
75
directory, and then flash just this demo with the command above.
74
76
77
+
## Building and running on Linux
78
+
79
+
Make sure you are using the [Devcontainer](../Devcontainers.md) or have the necessary
80
+
tools for Linux described in the [Get Started with Linux](../GetStartedLinux.md) guide.
81
+
82
+
In Linux, the the supervisor is split in two parts:
83
+
84
+
-`ocred`, the ocre daemon which uses a control socket that listens in a socket.
85
+
-`ocre-cli`, the ocre command line which interacts with the daemon to manage the containers.
86
+
87
+
From the root of the repository, or from anywhere else, create build directory:
88
+
89
+
```sh
90
+
mkdir build
91
+
cd build
92
+
```
93
+
94
+
Configure the Ocre Library build:
95
+
96
+
```sh
97
+
cmake ..
98
+
```
99
+
100
+
Make sure `..` points to the root of the ocre-runtime source tree.
101
+
102
+
Build ocre and the samples:
103
+
104
+
```sh
105
+
make
106
+
```
107
+
108
+
Run the daemon:
109
+
110
+
```sh
111
+
./src/samples/supervisor/posix/server/ocred
112
+
```
113
+
114
+
Note that this command should be run from the build directory
115
+
(i.e. the directory that contains files in the relative path `./src/ocre/var/lib/ocre/images/`).
116
+
117
+
This will create the ocre socket by default in `/tmp/ocre.sock`.
118
+
119
+
On another terminal, run the client:
120
+
121
+
```sh
122
+
./src/samples/supervisor/posix/ocre_cli ps
123
+
```
124
+
125
+
Other commands, described in the next section work just fine.
126
+
127
+
Notice that the container logs are not redirected to the client. Check the ocre daemon logs for more information.
128
+
75
129
## Using ocre-cli (shell)
76
130
77
131
Quick usage of ocre client is described below. Detailed usage information can be found on the [Ocre CLI](../OcreCli.md) documentation.
Copy file name to clipboardExpand all lines: docs/tests/SystemTests.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,8 @@ cd tests/system/posix/build
25
25
26
26
Configure and build the cmake project. Note that `..` points to `tests/system/posix`:
27
27
28
+
Alternatively, the IPC system tests can be build in the directory `tests/system/posix-ipc`. Note that only `test_context` and `test_container` are available in IPC mode.
29
+
28
30
```sh
29
31
cmake ..
30
32
make
@@ -68,6 +70,7 @@ Please, refer to their source code for more details.
68
70
## Zephyr
69
71
70
72
### Build and run
73
+
71
74
To build the Zephyr system tests for the `native_sim_64` board:
72
75
73
76
```sh
@@ -82,16 +85,19 @@ Replace `context` with `container`, `lib`, or `ocre` to build different tests:
82
85
-`tests/system/zephyr/container` - Tests the specific functionality of a container
83
86
84
87
To run the test:
88
+
85
89
```sh
86
90
west build -t run
87
91
```
88
92
89
93
The last lines of the output will be something like:
94
+
90
95
```
91
96
-----------------------
92
-
25 Tests 0 Failures 0 Ignored
97
+
25 Tests 0 Failures 0 Ignored
93
98
OK
94
99
```
95
100
96
101
### Details
102
+
97
103
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