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: README.md
+30-4Lines changed: 30 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,6 +192,20 @@ Once you save your changes to `.vscode/c_cpp_properties.json`, you should see th
192
192
193
193
### Building and Testing
194
194
195
+
#### Prerequisites
196
+
197
+
- Docker and Docker Compose
198
+
- For **macOS users**: Bash 4.0+ is required due to the use of associative arrays. macOS ships with Bash 3.2 by default. You can upgrade with:
199
+
```shell
200
+
# Install a newer bash version
201
+
brew install bash
202
+
203
+
# Update your shell or ensure the scripts use the new bash
204
+
export PATH="/opt/homebrew/bin:$PATH"# or /usr/local/bin for Intel Macs
205
+
```
206
+
207
+
#### Available Commands
208
+
195
209
The `./scripts` file contains multiple commands to make things easy:
196
210
197
211
| Command | Description |
@@ -234,28 +248,40 @@ The tests use a customized NGINX image, distinct from the main image, as well as
234
248
235
249
After making changes and finding that some tests fail, it can be difficult to understand why. By default, logs are written to Docker's internal log mechanism, but they won't be persisted after the test run completes and the containers are removed.
236
250
237
-
If you'd like to persist logs across test runs, you can configure the log driver to use `journald` (on Linux/Unix systemsfor example). You can do this by setting the environment variable `LOG_DRIVER` before running the tests:
251
+
If you'd like to persist logs across test runs, you can configure the log driver. By default, logs use the `json-file` driver for cross-platform compatibility. On Linux systems, you may prefer to use `journald`for better integration with systemd. You can do this by setting the environment variable `LOG_DRIVER` before running the tests:
238
252
239
253
```shell
240
-
#need to rebuild the test runner with the proper log driver
254
+
#For Linux systems with systemd (optional)
241
255
export LOG_DRIVER=journald
242
256
257
+
# For other systems or if you prefer file-based logs (default)
258
+
export LOG_DRIVER=json-file
259
+
243
260
# rebuild the test images
244
261
./scripts rebuild_test
245
262
246
263
# run the tests
247
264
./scripts test
248
265
249
266
# check the logs -- adjust the container name as needed
Now you'll be able to see logs from previous test runs. The best way to make use of this is to open two terminals, one where you run the tests, and one where you follow the logs:
274
+
Now you'll be able to see logs from previous test runs. The best way to make use of this is to open two terminals, one where you run the tests, and one where you follow the logs:
254
275
255
276
```shell
256
277
# terminal 1
257
278
./scripts test
258
279
259
-
# terminal 2
280
+
# terminal 2 - choose based on your LOG_DRIVER setting:
0 commit comments